ID:167910
 
I've been trying to code... a way players can talk to a Tournament npc and the npc can host tournments.. i need help badly.

Thxs in advance

-shadow
mob/NPC/Host
icon = 'ICON.dmi'
density = 1
New()
..()
Wander()
proc/Wander()
step_rand(src)
spawn(rand(1, 35)) Wander()
verb/talk()
set src in oview(2)
switch(alert("<greeting>, <question>", "Title", "Option1", "Option1", "Tournament"))
if("Option1")
//....
if("Option2")
//...
if("Tournament") // conversation followas that model
var/opponent1 = input("<question>", "Title", "Option1", "Option1", "Tournament") as mob in oview(4)
// as many as you want
opponent1.loc = locate(/*Starting loc 1 for tourney*/)
usr.loc = locate(/*Starting loc 2 for tourney*/)
// for each player
/* then set a win condition and make it so when someone wins, everybody comes back to the
host. Then the winner gets whatever the prize is.*/
\

there.


--Vito
In response to Vito Stolidus
Thxs~~
In response to Vito Stolidus
Vito Stolidus wrote:
mob/NPC/Host
> icon = 'ICON.dmi'
> density = 1
> New()
> ..()
> Wander()
> proc/Wander()
> step_rand(src)
> spawn(rand(1, 35)) Wander()
> verb/talk()
> set src in oview(2)
> switch(alert("<greeting>, <question>", "Title", "Option1", "Option1", "Tournament"))
> if("Option1")
> //....
> if("Option2")
> //...
> if("Tournament") // conversation followas that model
> var/opponent1 = input("<question>", "Title", "Option1", "Option1", "Tournament") as mob in oview(4)
> // as many as you want
> opponent1.loc = locate(/*Starting loc 1 for tourney*/)
> usr.loc = locate(/*Starting loc 2 for tourney*/)
> // for each player
> /* then set a win condition and make it so when someone wins, everybody comes back to the
> host. Then the winner gets whatever the prize is.*/
\
>

there.


--Vito


Ok i got everything ready what do u need to make it a WORLD TOURNAMENT so, everyone can join.
In response to Shadowknightx
Just make everyone go into the tourney:

for(var/mob/A in world)
if(A.client)
A.loc = locate([start coordinates here])

You can also do this for mob in a range. easy.

--Vito