PewN Posted July 16, 2012 Posted July 16, 2012 i set it but the guild name on waiting room doesn't showing can anyone help me here about it then i want the name of the guild will set on pub set .guild$, strcharinfo(2); guild_war,113,152,4 script Sign Board 852,{ end; OnInit: waitingroom " [ "+.guild$+" ]",0; end; } why the name of the guild not showing on pub here? bump! Quote
Gerome Posted July 16, 2012 Posted July 16, 2012 is this all the code? guild_war,113,152,4 script Sign Board 852,{ end; OnInit: waitingroom " [ "+.guild$+" ]",0; end; } .guild$ is empty. and take note the variable type you've use is an NPC variable.it can be use on that npc only.unless you'll use getvariableofnpc They exist in the NPC and disappear when the server restarts or the NPC is reloaded. Can be accessed from inside the NPC or by calling Quote
Intense Posted July 16, 2012 Posted July 16, 2012 (edited) If variables with prefix "." are different NPCs, you have to call by getvariableofnpc(<variable>,"<npc name>"). . Edited July 16, 2012 by Intense Quote
PewN Posted July 17, 2012 Author Posted July 17, 2012 guild_war,117,154,5 script Machine 100,{ L_main: if ( getguildmasterid( getcharid(2) ) != getcharid(0) ) goto L_not_gm; if ( carac == 1 ) goto L_cant; set .@fcast,15; progressbar "ffff00",.@fcast; set carac,1; set .guild$, strcharinfo(2); // i set it here! mes "This Map is your own now"; maprespawnguildid "guild_war",getcharid(2),2; close; L_cant: mes "You Already have this"; close; L_c2: mes "Other Player Configuring it"; close; L_not_gm: mes "Only Gms"; close; OnPCLoadMapEvent: if( strcharinfo(3) == "Phantasia" ){ set carac,0; end; } } guild_war,113,152,4 script Sign Board 852,{ end; OnInit: waitingroom " [ "+.guild$+" ]",0; end; } Phantasia mapflag loadevent Quote
Emistry Posted July 17, 2012 Posted July 17, 2012 since you dont know how to use the getvariableofnpc... you can just simply use a temporary global variable.. $@guild$ Quote
PewN Posted July 17, 2012 Author Posted July 17, 2012 (edited) guild_war,117,154,5 script Machine 100,{ L_main: if ( getguildmasterid( getcharid(2) ) != getcharid(0) ) goto L_not_gm; if ( carac == 1 ) goto L_cant; set .@fcast,15; progressbar "ffff00",.@fcast; set carac,1; set $@guild$, strcharinfo(2); mes "This Map is your own now"; maprespawnguildid "guild_war",getcharid(2),2; close; L_cant: mes "You Already have this"; close; L_c2: mes "Other Player Configuring it"; close; L_not_gm: mes "Only Gms"; close; OnPCLoadMapEvent: if( strcharinfo(3) == "Phantasia" ){ set carac,0; end; } } guild_war,113,152,4 script Sign Board 852,{ end; OnInit: waitingroom " [ "+$@guild$+" ]",0; end; } Edited July 17, 2012 by bVersatile Quote
Joseph Posted July 17, 2012 Posted July 17, 2012 OnInit: while(1) { waitingroom " [ "+(($@guild$)?$@guild$:"No Guild")+" ]",0; sleep 1000; delwaitingroom; } Quote
Emistry Posted July 17, 2012 Posted July 17, 2012 use this at 1st npc set $@guild$, strcharinfo(2); mes "This Map is your own now"; maprespawnguildid "guild_war",getcharid(2),2; close2; donpcevent "SECONDNPCNAME::OnInit"; end; use this in the second npc... OnInit: delwaitingroom; waitingroom "[ "+$@guild$+" ]",0; end; Quote
Question
PewN
i set it but the guild name on waiting room doesn't showing
can anyone help me here about it
then i want the name of the guild will set on pub
why the name of the guild not showing on pub here?
bump!
7 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.