Eross Posted December 23, 2021 Posted December 23, 2021 Hi ! ive created a script that will dispel specific buffs on changing maps .. its working fine until I upgraded to latest Rathena .. I dont know why ? or maybe my SQL script is outdated ? I dont know ..Please help me thankyou - script dispell_buff -1,{ OnPCLoadMapEvent: .@map$ = strcharinfo(3); query_sql ("SELECT `last_map` FROM `char` WHERE `char_id` = "+ getcharid(0), .lastmap$); if (.@map$ == .lastmap$) { getmapxy(.map$,.x,.y,BL_PC); end; } else { //sleep2 1000; query_sql "UPDATE `char` SET `last_map` = '"+escape_sql(.@map$)+"' WHERE `char_id` = '"+getcharid(0)+"'"; //sc_end sc_spirit; sc_end sc_gospel; sc_end SC_POEMBRAGI; sc_end SC_APPLEIDUN; sc_end SC_ASSNCROS; sc_end SC_WHISTLE; sc_end SC_SERVICE4U; //sc_end 37; // holy weapon //sc_end 38; // holy armor sc_end 187; // increase all stat sc_end 194; // increase hit sc_end 196; // increase flee sc_end 198; // max hp increase sc_end 199; // max sp increase sc_end 200; // attach strength sc_end 202; // increase def sc_end 214; // SC_SCRESIST sc_end 175; // POEMBRAGI sc_end 181; // SERVICE4U specialeffect2 235; getmapxy(.map$,.x,.y,BL_PC); end; } } Quote
0 Haruka Mayumi Posted December 23, 2021 Posted December 23, 2021 (edited) The reason that it isn't working is because of the variables on that code. Here's the simplified code for that. EDIT: This code won't work on maps without loadevent flags - script rmvbuff -1,{ OnPCLoadMapEvent: if(@rmvmap$ == strcharinfo(3)) end; //sc_end sc_spirit; sc_end sc_gospel; sc_end SC_POEMBRAGI; sc_end SC_APPLEIDUN; sc_end SC_ASSNCROS; sc_end SC_WHISTLE; sc_end SC_SERVICE4U; //sc_end 37; // holy weapon //sc_end 38; // holy armor sc_end 187; // increase all stat sc_end 194; // increase hit sc_end 196; // increase flee sc_end 198; // max hp increase sc_end 199; // max sp increase sc_end 200; // attach strength sc_end 202; // increase def sc_end 214; // SC_SCRESIST sc_end 175; // POEMBRAGI sc_end 181; // SERVICE4U specialeffect2 235; @rmvmap$ = strcharinfo(3); end; } Edited December 23, 2021 by Haruka Mayumi Quote
0 Chaos92 Posted December 23, 2021 Posted December 23, 2021 4 hours ago, Eross said: Hi ! ive created a script that will dispel specific buffs on changing maps .. its working fine until I upgraded to latest Rathena .. I dont know why ? or maybe my SQL script is outdated ? I dont know ..Please help me thankyou - script dispell_buff -1,{ OnPCLoadMapEvent: .@map$ = strcharinfo(3); query_sql ("SELECT `last_map` FROM `char` WHERE `char_id` = "+ getcharid(0), .lastmap$); if (.@map$ == .lastmap$) { getmapxy(.map$,.x,.y,BL_PC); end; } else { //sleep2 1000; query_sql "UPDATE `char` SET `last_map` = '"+escape_sql(.@map$)+"' WHERE `char_id` = '"+getcharid(0)+"'"; //sc_end sc_spirit; sc_end sc_gospel; sc_end SC_POEMBRAGI; sc_end SC_APPLEIDUN; sc_end SC_ASSNCROS; sc_end SC_WHISTLE; sc_end SC_SERVICE4U; //sc_end 37; // holy weapon //sc_end 38; // holy armor sc_end 187; // increase all stat sc_end 194; // increase hit sc_end 196; // increase flee sc_end 198; // max hp increase sc_end 199; // max sp increase sc_end 200; // attach strength sc_end 202; // increase def sc_end 214; // SC_SCRESIST sc_end 175; // POEMBRAGI sc_end 181; // SERVICE4U specialeffect2 235; getmapxy(.map$,.x,.y,BL_PC); end; } } have u tried sc_end SC_ALL; Quote
Question
Eross
Hi ! ive created a script that will dispel specific buffs on changing maps .. its working fine until I upgraded to latest Rathena .. I dont know why ? or maybe my SQL script is outdated ? I dont know ..Please help me thankyou
- script dispell_buff -1,{ OnPCLoadMapEvent: .@map$ = strcharinfo(3); query_sql ("SELECT `last_map` FROM `char` WHERE `char_id` = "+ getcharid(0), .lastmap$); if (.@map$ == .lastmap$) { getmapxy(.map$,.x,.y,BL_PC); end; } else { //sleep2 1000; query_sql "UPDATE `char` SET `last_map` = '"+escape_sql(.@map$)+"' WHERE `char_id` = '"+getcharid(0)+"'"; //sc_end sc_spirit; sc_end sc_gospel; sc_end SC_POEMBRAGI; sc_end SC_APPLEIDUN; sc_end SC_ASSNCROS; sc_end SC_WHISTLE; sc_end SC_SERVICE4U; //sc_end 37; // holy weapon //sc_end 38; // holy armor sc_end 187; // increase all stat sc_end 194; // increase hit sc_end 196; // increase flee sc_end 198; // max hp increase sc_end 199; // max sp increase sc_end 200; // attach strength sc_end 202; // increase def sc_end 214; // SC_SCRESIST sc_end 175; // POEMBRAGI sc_end 181; // SERVICE4U specialeffect2 235; getmapxy(.map$,.x,.y,BL_PC); end; } }
2 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.