ID:179822
 
Ok im working on a arena code and i need a little help...



Challenge(mob/M in world)
set name="Challenge another user to the arena"
set category="Misc."
world << "[usr] has challenged [M] to the arena!"
var/selling = M << input("[usr] has challenged you to the arena, will you accept?") in list("Accept","Decline") // list of what the shopkeeper sells
var/cost
if(selling == "Accept")
world << "[M] has Accepted [usr]'s Challenge!"
usr.verbs -= /mob/verb/Attack
usr.verbs+= /mob/proc/attack2
usr.ArenaHP += usr.HP
M.ArenaHP += usr.HP
if(selling == "Decline")
world << "[M] had declined [usr]'s Challenge!"




thats my code, it will have the person being challenged get a thing that pops up asking if they will accept of decline, but thats all that happens. when they accept of decline nothing happens. plz help
Are You Making a dbz game?
dbz73 wrote:
Ok im working on a arena code and i need a little help...



Challenge(mob/M in world)
set name="Challenge another user to the arena"
set category="Misc."
world << "[usr] has challenged [M] to the arena!"
var/selling = M << input("[usr] has challenged you to the arena, will you accept?") in list("Accept","Decline")
if(selling == "Accept")
world << "[M] has Accepted [usr]'s Challenge!"
usr.verbs -= /mob/verb/Attack
usr.verbs+= /mob/proc/attack2
usr.ArenaHP += usr.HP
M.ArenaHP += usr.HP
if(selling == "Decline")
world << "[M] had declined [usr]'s Challenge!"




thats my code, it will have the person being challenged get a thing that pops up asking if they will accept of decline, but thats all that happens. when they accept of decline nothing happens. plz help
The Grim Reaper Wrote:

First off... remove var cost(like I did for your qoute)... 2nd of all... Try it like this and not use that arena code anyway...

mob/verb/Challenge(mob/M in world)
M:Arena()

mob/proc/Arena()
var/Decision = input("Accept or Decline?") in list ("Accept","Decline")
switch(Decision)
if("Accept")
(Code of accepting)
if("Decline")
(Code of declining)

The biggest problem is that you're trying to get M to have to decide to accept or decline in the exact same code as you're challenging them... I don't think that can be done, if I'm wrong, oh well...
In response to The Grim Reaper
The Grim Reaper wrote:
dbz73 wrote:
First off... remove var cost(like I did for your qoute)... 2nd of all... Try it like this and not use that arena code anyway...

ok thanks, the reason the cost thing is there, is because i basicly took that from my Shop thing heh, yea, my other code i did didnt work right so i did that.
In response to The Grim Reaper
The Grim Reaper wrote:
dbz73 wrote:
Ok im working on a arena code and i need a little help...



Challenge(mob/M in world)
set name="Challenge another user to the arena"
set category="Misc."
world << "[usr] has challenged [M] to the arena!"
var/selling = M << input("[usr] has challenged you to the arena, will you accept?") in list("Accept","Decline")
if(selling == "Accept")
world << "[M] has Accepted [usr]'s Challenge!"
usr.verbs -= /mob/verb/Attack
usr.verbs+= /mob/proc/attack2
usr.ArenaHP += usr.HP
M.ArenaHP += usr.HP
if(selling == "Decline")
world << "[M] had declined [usr]'s Challenge!"




thats my code, it will have the person being challenged get a thing that pops up asking if they will accept of decline, but thats all that happens. when they accept of decline nothing happens. plz help
The Grim Reaper Wrote:

First off... remove var cost(like I did for your qoute)... 2nd of all... Try it like this and not use that arena code anyway...

mob/verb/Challenge(mob/M in world)
M:Arena()

mob/proc/Arena()
var/Decision = input("Accept or Decline?") in list ("Accept","Decline")
switch(Decision)
if("Accept")
(Code of accepting)
if("Decline")
(Code of declining)

The biggest problem is that you're trying to get M to have to decide to accept or decline in the exact same code as you're challenging them... I don't think that can be done, if I'm wrong, oh well...



erm error, Inconsistent indentation.
In response to dbz73
dbz73 wrote:
erm error, Inconsistent indentation.

Well that's probably because you copy pasted from the forum which you're never supposed to do, do back and reindent using the tab button.


-=|Nadrew|=-
In response to Nadrew
Nadrew wrote:
dbz73 wrote:
erm error, Inconsistent indentation.

Well that's probably because you copy pasted from the forum which you're never supposed to do, do back and reindent using the tab button.


-=|Nadrew|=-

i did lol
In response to CloneGoku
Yes, No, Maybe?




He-She-It-Things rule!!!
In response to CloneGoku
CloneGoku wrote:
Are You Making a dbz game?

erm.. no lol