Anyone knows how can i do to the npc send a message to a specify map(1) when in this same map(1) there is somebody and in another map(2) there isn't anybody ??? . The npc has to check if someone go in the map(1) and if there is anyone in the map(2), so it send the message.
I try to do something like this but doesn't work :
if(getmapusers("new_1-2") > 0) {
mapannounce "prontera","Now, there is one player doing the test, please wait your turn!",bc_map,0xFF0000;
end;
}
i'm not getting to do the npc check if one player go in the map(1)=prontera to the npc send the message.
*map(2) = new_1-2
could anyone help me ?
I would like to add a code in it that when one player go out from new_1-2, the npc send a message to prontera like " new_1-2 is empty, please go into map the next ".
my code :
prontera,151,182,6 script John 81,{
end;
OnInit:
waitingroom "Waiting Room",5,strnpcinfo(3)+"::OnStart",1;
end;
OnStart:
if( getmapusers( "new_1-2" ) > 0) {
attachrid $@warpwaitingpc;
announce "The player "+strcharinfo(0)+" is in the event room!",bc_blue|bc_all;
end;
}
warpwaitingpc "new_1-2",98,17,1;
attachrid $@warpwaitingpc;
announce "The player "+strcharinfo(0)+" was teleported to the event room!",bc_blue|bc_all;
end;
}
So, i just need to add something that do it sends a message when a player goes out from new_1-2 . I tried here, but no advance.
Could anyone help me???