i dont mean the sql comand. I mean the hole synthaxe (difine variable ect.)
So i have a other problem my NPC is near to finsih but i cant find the bug.
Message from mapserver:
My script:
payon,115,115,1 script Rent NPC 569,{
switch(select("What can i do here?:Rent a Healer")) {
case 1:
mes "If you give me some Coins the Healer will give you also Agi up and Blessing Level 5 for 7 days.";
break;
case 2:
mes "You wanna rent the Healer for ^FF00007 Days^000000? You will lose ^FF000050 Coins^000000!";
switch(select("Rent the Healer!:Run away.")) {
case 1:
set @rentnpcdate,gettimetick(2)+604800;
set @rentnpcdate2,gettimetick(2);
query_sql "SELECT `char_id`,`npc`, `date` FROM `rentnpc`", @charid, @npc, @rentime;
if (@charid == getcharid(0) && @npc == 1 && @renttime < gettimetick(2)){
mes "You already rent the Healer.";
close;
}
else if (@charid != getcharid(0) && @npc != 1 ) {
//set @rentnpcdate,gettimetick(2)+604800;
if (countitem(7539) < 50) {
mes "Im Sorry, but you dont have enough Coins.";
close;
}
else {
delitem 7539, 50;
query_sql "INSERT INTO `rentnpc` (`char_id`, `account_id`, `npc`, `date`) VALUES ('"+getcharid(0)+"', '"+getcharid(3)+"', '1', "+ @rentnpcdate +")";
mes "Done!";
break;
}
}
else (@charid == getcharid(0) && @npc == 1 && @renttime > @rentnpcdate) {
//set @rentnpcdate,gettimetick(2)+604800;
if (countitem(7539) < 50) {
mes "Im Sorry, but you dont have enough Coins.";
close;
}
else {
delitem 7539, 50;
query_sql "UPDATE `rentnpc` (`char_id`, `account_id`, `npc`, `date`) VALUES ('"+getcharid(0)+"', '"+getcharid(3)+"', '1', "+ @rentnpcdate +")";
mes "Done!";
break;
}
}
case 2:
mes "...";
close;
}