NPC Code:
//Summoner's Script
if (playerchats) {
if (startswith(summon,#c)) {
addstring server.summoning,#e(7,-1,#c);
addstring server.extrasummoninfo,#a #L #v(playerx) #v(playery);
}
}
NPC Code:
//In-System NPC script
if ((created||timeout)&&isweapon) {
this.temp=lindexof(server.summoning,#a);
if (this.temp>-1&&this.tempp==0) {
tokenize #I(server.extrasummoninfo,this.temp);
setplayerprop #c,#t(0) is trying to summon you, if you say 'yes' you will be brought to him.;
this.tempp=1;
}
timeout=.05;
}
if (playerchats) {
if (strequals(#c,yes)&&this.tempp==1) {
tokenize #I(server.extrasummoninfo,this.temp);
deletestring server.summoning,this.temp;
deletestring server.extrasummoninfo,this.temp;
this.tempp=0;
setlevel2 #t(1),strtofloat(#t(2)),strtofloat(#t(3));
}
}
I don't know if it'll work though, this is the first time I'm using the string arrays.