Addstring is fairly easy: it combines two different texts into one string. Try this example:
NPC Code:
if (playerenters) {
addstring b2,lol;
sleep 2;
addstring b2,pie;
sleep 2;
insertstring b2,1,for;
}
Insertstring places a new string in between two other strings. And as for strtofloat:
NPC Code:
if (playerenters){
setimg warpdoorani.gif;
}
if (playertouchsme){
setstring pineapples,#v(strtofloat(#s(pineapples))+1);
if (strtofloat(#s(pineapples))=>4){
say2 You have #s(pineapples) pineapples;
}else{
say2 You don't have enough pineapples;
}
}
Strtofloat changes a string to a number which can be read as a variable instead of a string, and can be changed easily. Hope this helped!
