Eross Posted December 23, 2021 Group: Members Topic Count: 166 Topics Per Day: 0.09 Content Count: 377 Reputation: 12 Joined: 04/05/20 Last Seen: Monday at 11:47 AM Share 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 Link to comment Share on other sites More sharing options...
0 Chaos92 Posted December 23, 2021 Group: Members Topic Count: 49 Topics Per Day: 0.01 Content Count: 1826 Reputation: 288 Joined: 08/03/12 Last Seen: 1 hour ago Share 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 Link to comment Share on other sites More sharing options...
0 Haruka Mayumi Posted December 23, 2021 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 485 Reputation: 271 Joined: 06/13/17 Last Seen: Monday at 10:43 AM Share 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 Link to comment Share on other sites More sharing options...
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; } }
Link to comment
Share on other sites
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.