Hi !
As explained on topic, i just want to know if it's possible to put a text (like "hello") in a variable.
After some research, it seems that local vars can do that but i need a var that can be used by every npc, like a global var.
Here is my problem, i want to save the name of two players in a var to make a broadcast like :
" [nameofplayer1] has challenged [nameofplayer2] "
players must be able to register from any town.
help ^^
Page 1 of 1
Put text in vars Is it possible ?
#2
Posted 22 June 2008 - 05:19 PM
You can use GlobalStr which are the same as GlobalVar, but they are strings.
SetGlobalStr "name1" PcName // Name of the player talking to the npc
SetGlobalStr "name2" theothername //(could be a local var, etc)
then you can do
var localvar1 = GetGlobalStr "name1"
var localvar2 = GetGlobalStr "name2"
broadcastserver "FF0000" FW_NORMAL 10 0 0 "The player [" + localvar1 + "] has challenged [" + localvar2 + "]."
SetGlobalStr "name1" PcName // Name of the player talking to the npc
SetGlobalStr "name2" theothername //(could be a local var, etc)
then you can do
var localvar1 = GetGlobalStr "name1"
var localvar2 = GetGlobalStr "name2"
broadcastserver "FF0000" FW_NORMAL 10 0 0 "The player [" + localvar1 + "] has challenged [" + localvar2 + "]."
#3
Posted 23 June 2008 - 02:33 PM
Thanks a lot !
All seems to work perfectly now ^^
Well i have an other question, it's about WoE, but i''ll do an other thread.
Thanks again !
All seems to work perfectly now ^^
Well i have an other question, it's about WoE, but i''ll do an other thread.
Thanks again !
Share this topic:
Page 1 of 1

Help










