-
Posts
2407 -
Joined
-
Last visited
-
Days Won
51
Content Type
Profiles
Forums
Downloads
Jobs Available
Server Database
Third-Party Services
Top Guides
Store
Crowdfunding
Everything posted by Capuche
-
I don't understand what you want to do, but note addrid will attach the script to all players in the NPC map. That means it will display n times your 'second part' (n the number of player in the map). You may call the addrid part with a donpcevent to avoid this
-
Alright I don't understand what you want to do.. xD But maybe with a sample of your script..
-
You just need to add a freeloop 1; before the for in the Scavenger script's function
-
Taking a look at this script for DrewxD.. Replace all occurence of !.@query by .@query < 1 because query_sql return -1 on failure/empty array (on rathena) it might result that the condition if (!.@query) is false when it should be true
-
If you want to list the variables in an array, what about - script FromArrayToVariable -1,{ setarray .@array_of_variables$[0], "#Player_Variable01", "#Player_Variable02"; .@size_array = getarraysize(.@array_of_variables$); for ( .@i = 0; .@i < .@size_array; .@i++ ) if ( getd( ".@array_of_variables$[" + .@i + "]") != 1 ) setd ".@array_of_variables$[" + .@i + "]", 1; end; } but if you want to alter the variable of a player online you may use set <variable>,<expression>{,<char_id>}; and getvar <variable>,<char_id>; to retrieve the the variable
-
izlude,150,155,5 script Sample 56,{ if ( BaseLevel == 99 && reward_lvl == 0 && Upper && .count < 100 ) { if ( .count < 3 ) getitem 714,1; if ( .count < 100 ) getitem 7227,1; reward_lvl++; .count++; announce "Congratulations " + strcharinfo(0) + " for receiving the level 99 reward, there are only "+ (100-.count) +" rewards left!",0; end; } if ( reward_lvl ) mes "you already get your reward"; else if ( BaseLevel != 99 ) mes "you are not lvl 99"; else if ( Upper == 0 ) mes "you must be advance or baby class."; if ( .count < 100 ) mes "there are only "+ (100-.count) +" rewards left!"; else mes "I already give all my items sorry."; close; OnInit: query_sql( "select count(`value`) from `char_reg_num` where `key` = 'reward_lvl'", .count ); if ( .count > 99 ) end; addrid 0; if ( .count > 99 ) end; if ( reward_lvl ) .count++; end; }
-
for ( .@a = 0; .@a < .maxsize; .@a++ ) set .@fetch_name$, .@fetch_name$ + "char_id = "+ @char_id[.@a]+ " OR "; query_sql "SELECT name FROM `char` WHERE "+ .@fetch_name$, @char_name; >> query_sql "SELECT name FROM `char` WHERE char_id = "+ @char_id[.@a]+ " OR ", @char_name; there is an extra OR at the end of the query
-
query_sql "SELECT name FROM `char` WHERE "+ .@fetch_name$, @char_name; If you replace the content of .@fetch_name$ you will find out what's wrong
-
quests_eclage.txt and Encounter in a Strange Land Quest
Capuche replied to johnbond's question in Scripting Support
To enter in the instance you must create a party and talk to the NPC named "It is closed shut." https://github.com/rathena/rathena/blob/master/npc/re/instances/EclageInterior.txt#L57 -
What about.. - script drop_headgear -1,{ OnPCDieEvent: if ( getequipisequiped(EQI_HEAD_TOP) && getmapflag( strcharinfo(3),mf_pvp ) ) { getmapxy .@map$, .@x, .@y, 0; makeitem2 getequipid(EQI_HEAD_TOP),1,.@map$,.@x,.@y,1,getequiprefinerycnt(EQI_HEAD_TOP),0,getequipcardid(EQI_HEAD_TOP,0),getequipcardid(EQI_HEAD_TOP,1),getequipcardid(EQI_HEAD_TOP,2),getequipcardid(EQI_HEAD_TOP,3); delequip EQI_HEAD_TOP; } end; }
-
script that will create a character in your account
Capuche replied to joelolopez's question in Script Requests
Like a bot? something related with https://rathena.org/board/topic/103508-txtlogin/ ? -
Make a Grep #define MAX_MEMOPOINTS 3 in mmo.h
-
Note it should be better to run the sql offline in one go (you save memory) INSERT INTO `acc_reg_num` (`account_id`, `key`, `index`, `value`) select account_id, '#CASHPOINTS', 0, `value` from `global_reg_value` on duplicate key update `acc_reg_num`.`value` = `acc_reg_num`.`value` + `global_reg_value`.`value` delete from `global_reg_value` where `str` = '#CASHPOINTS'
-
Hmm maybe - script update points -1,{ OnPCLoginEvent: query_sql "INSERT INTO `acc_reg_num` (`account_id`, `key`, `index`, `value`) select account_id, '#CASHPOINTS', 0, `value` from `global_reg_value` where `account_id` "+ "= '"+ getcharid(3) +"' on duplicate key update `acc_reg_num`.`value` = `acc_reg_num`.`value` + `global_reg_value`.`value`"; query_sql "delete from `global_reg_value` where account_id = "+ getcharid(3) +" and `str` = '#CASHPOINTS'"; end; }
-
help patching up the bug hole in my script
Capuche replied to joelolopez's question in Scripting Support
Calm down guys Try while ( .@i < @inventorylist_count ) { if ( @inventorylist_equip[.@i] == 0 && ( @inventorylist_card1[.@i] == 4305 || @inventorylist_card2[.@i] == 4305 || @inventorylist_card3[.@i] == 4305 || @inventorylist_card4[.@i] == 4305 ) ){ mes "Can't allow you to continue."; close; } set .@i, .@i + 1; } // Once loop is finished, it will continue here. mes "Thank you Evelynn (:"; close; but I prefer if ( isequippedcnt(4001) == 0 && ( checkequipedcard(4001) > 0 || countitem(4001) > 0 ) ) {// 4001 not equipped but 4001 inserted into an equipment or alone in the inventory mes "Can't allow you to continue."; close; } mes "Thank you Evelynn (:"; close; -
help patching up the bug hole in my script
Capuche replied to joelolopez's question in Scripting Support
What about if (checkequipedcard(4001) > 0 || countitem(4001) > 0) { mes "Can't allow you to continue."; close; } mes "Thank you Evelynn (:"; close; Nb. -
https://rathena.org/board/topic/102946-script-engine-upgrade/ You only need to update the query for global_reg_value the others query should working
-
What about heal with showscript ? https://github.com/rathena/rathena/blob/master/doc/script_commands.txt#L3955 https://github.com/rathena/rathena/blob/master/doc/script_commands.txt#L3815 heal -2000,0; showscript "I lost 2000 hp.";
-
Please update your emu https://github.com/rathena/rathena/commit/63b076ef9699fa08e6de1975d5d87212de36f538
-
prontera,150,180,6 script dfghgf 56,{ if ( .global_buff - gettimetick(1) > 0 ) { mes "There is already a special buff. Come later !"; close; } mes "Everyone will get a buff for 6 mins."; close2; .global_buff = gettimetick(1) + 360;// 360 secs initnpctimer; addrid 0; sc_start SC_STRFood,360000,10;// 360 secs end; OnTimer360000: announce "End of Event",bc_all; end; OnPCLoginEvent: if ( .global_buff - gettimetick(1) > 0 ) { .@timer = ( .global_buff - gettimetick(1) ) * 1000; sc_start SC_STRFood, .@timer,10; } end; OnPCLogoutEvent: if ( .global_buff - gettimetick(1) > 0 )// remove the buff to update the timer on login sc_end SC_STRFood; end; } Well.. an announce when the timer ends ?
-
prontera,150,180,6 script dfghgf 56,{ if ( .global_buff - gettimetick(1) > 0 ) { mes "There is already a special buff. Come later !"; close; } mes "Everyone will get a buff for 6 mins."; close2; .global_buff = gettimetick(1) + 360;// 360 secs addrid 0; sc_start SC_STRFood,360000,10;// 360 secs end; OnPCLoginEvent: if ( .global_buff - gettimetick(1) > 0 ) { .@timer = ( .global_buff - gettimetick(1) ) * 1000; sc_start SC_STRFood, .@timer,10; } end; OnPCLogoutEvent: if ( .global_buff - gettimetick(1) > 0 )// remove the buff to update the timer on login sc_end SC_STRFood; end; }
-
prontera,150,180,6 script dfghgf 56,{ $global_buff++; addrid 0; sc_start SC_STRFood,360000,10; #my_buff = $global_buff; end; OnPCLoginEvent: if ( $global_buff != #my_buff ) { sc_start SC_STRFood,360000,10; #my_buff = $global_buff; } end; } Not sure what you want to do. Only gm can set it ? (not the case in the script above)
-
[Fixed] EVERYTHING STOP WORKING AFTER LATEST PULL REQUEST
Capuche replied to Tales's question in General Support
Did you update your sql ? https://github.com/rathena/rathena/blob/master/sql-files/upgrades/upgrade_20150831.sql You should update your script too if you use query in global_reg_value table. or you could revert the change -
You can try the other ai, I forgot how it works with monster. Maybe there is one fit for you and poring
-
You did typo mistake. The quote means optionnal parameter, don't add them. The size should be : <size> can be: 0 = medium (default) 1 = small 2 = big and finally 2 friendly monsters don't attack each other but they attack the others (and they must be aggressive). In your sample it should be something like that 1@prt_are01,0,0,0,0 monster Poring 1002,100,1,1,1,0,0 1@prt_are01,0,0,0,0 monster Poring 1002,100,1,1,1,1,1 1@prt_are01,0,0,0,0 monster Poring 1002,100,1,1,1,2,1