Jump to content

Emistry

Forum Moderator
  • Posts

    9,753
  • Joined

  • Days Won

    308

Emistry last won the day on June 18

Emistry had the most liked content!

About Emistry

  • Birthday January 1

Profile Information

Recent Profile Visitors

59,155 profile views

Emistry's Achievements

  1. OnNPCKillEvent: if(!dagger) end; Change to OnNPCKillEvent: if(!dagger || dagger_quest2 == 1) end;
  2. *useatcmd "<command>"; This command will execute a script-bound atcommand for the attached RID. If the supplied command is not bound to any script, this command will act like 'atcommand' and attempt to execute a source-defined command. The three [email protected]_***** variables will NOT be set when invoking script-bound atcommands in this way.
  3. if (instance_create([email protected]_name$) < 0) { mes "Party Name: "+ getpartyname([email protected]_id); mes "Party Leader: "+strcharinfo(0); mes "^0000ff"[email protected]_name$+" ^000000- Reservation Failed!"; close; } try change to if (.instance_id) { if (instance_live_info(ILI_MODE, .instance_id) != -1) { mes "Someone already started before you."; mes "^0000ff"[email protected]_name$+" ^000000- Reservation Failed!"; close; } } [email protected]_id = instance_create([email protected]_name$); if ([email protected]_id < 0) { mes "Party Name: "+ getpartyname([email protected]_id); mes "Party Leader: "+strcharinfo(0); mes "^0000ff"[email protected]_name$+" ^000000- Reservation Failed!"; close; } .instance_id = [email protected]_id;
  4. if the db isn't stored in same instance, then you probably should setup a scheduled tasks to sync it or manually sync it instead.
  5. unequip EQI_ARMOR; <-------- delitem 30063,1; delequip [email protected],1; you aren't suppose to unequip the equipment when you trying to delete it.
  6. query_sql("UPDATE `e_broadcast` SET `repeat` = 1 WHERE `id` = "[email protected][[email protected]]+" LIMIT "); change to query_sql("UPDATE `e_broadcast` SET `repeat` = 1 WHERE `id` = "[email protected][[email protected]]+" LIMIT 1");
  7. Emistry

    group cash

    if (checkvending(convertpcinfo([email protected][[email protected]], CPC_NAME)) & 2) continue;
  8. sc_start (SC_STRFOOD + [email protected] - 1), 1200000, [email protected][[email protected] - bStr]; change to sc_start (SC_STRFOOD + [email protected] - 1 - bStr), 1200000, [email protected][[email protected] - bStr];
  9. range slot, when the server startup it will auto allocate some space to hold the npc view data if you assigned too much free slot, you are just wasting ur resources. and value shouldn't exceed NPC_RANGE3_END (unless you know exactly what you are trying to do), else no resources will be allocated for the npc view data.
  10. Emistry

    [resolved]

    your script suppose to kick the second or next character who have same IP or unique id. But you tested with only one char, which is also an Admin character. Test it with 2 normal character instead. remove the debug message, since its meant for debug purpose debugmes [email protected]$;
  11. Emistry

    [resolved]

    - script Sample -1,{ OnInit: // 1= if you have gepard 0=if you do not use gepard [email protected]_gepard = 1; setarray .map$, "quiz_00" , "prt_are_in" , "bat_c01" , "guild_vs2" , "ordeal_1-2" , "coliseum" , "ama_test" , "quiz_02" , "safari" , "niflheim" , "que_qsch01" , "[email protected]" , "[email protected]" , "p_track01" , "pvp_n_2-1"; [email protected]_size = getarraysize(.map$); for ([email protected] = 0; [email protected] < [email protected]_size; [email protected]++) setmapflag .map$[[email protected]], MF_LOADEVENT; .sql_field$ = ([email protected]_gepard ? "last_unique_id" : "last_ip"); end; OnPCLoadMapEvent: [email protected]$ = strcharinfo(3); if (inarray(.map$, [email protected]$) == -1) end; [email protected]$ = "SELECT `account_id` FROM `login`"; [email protected]$ = [email protected]$ + " WHERE 1=1"; [email protected]$ = [email protected]$ + " AND `group_id` < 99"; [email protected]$ = [email protected]$ + " AND `account_id` <> "+getcharid(3); [email protected]$ = [email protected]$ + " AND `account_id` NOT IN (SELECT `account_id` FROM `vendings` WHERE `autotrade` > 0)"; [email protected]$ = [email protected]$ + " AND `account_id` NOT IN (SELECT `account_id` FROM `buyingstores` WHERE `autotrade` > 0)"; [email protected]$ = [email protected]$ + " AND `"+.sql_field$+"` IN (SELECT `"+.sql_field$+"` FROM `login` WHERE `account_id` = "+getcharid(3)+")"; debugmes [email protected]$; [email protected] = query_sql([email protected]$, [email protected]); [email protected]_aid = getcharid(3); if ([email protected]) { for ([email protected] = 0; [email protected] < [email protected]; [email protected]++) { if (attachrid([email protected][[email protected]])) { if (strcharinfo(3) == [email protected]$) { attachrid [email protected]_aid; dispbottom "[ BrasilRO ] Me desculpe, mas para evitar abusos, Double Clients não são permitidos nesse mapa."; sleep2 2000; atcommand "@kick " + strcharinfo(0); end; } } } } end; } please at least try to tell "what" is not working next time, thank you.
  12. Emistry

    [resolved]

    may try this - script Sample -1,{ end; OnInit: // 1= if you have gepard 0=if you do not use gepard [email protected]_gepard = 1; setarray .map$, "quiz_00" , "prt_are_in" , "bat_c01" , "guild_vs2" , "ordeal_1-2" , "coliseum" , "ama_test" , "quiz_02" , "safari" , "niflheim" , "que_qsch01" , "[email protected]" , "[email protected]" , "p_track01" , "pvp_n_2-1"; [email protected]_size = getarraysize(.map$); for ([email protected] = 0; [email protected] < [email protected]_size; [email protected]++) setmapflag .map$[[email protected]], MF_LOADEVENT; .sql_field$ = ([email protected]_gepard ? "last_unique_id" : "last_ip"); end; OnPCLoadMapEvent: [email protected]$ = strcharinfo(3); if (inarray(.map$, [email protected]$) == -1) end; [email protected]$ = "SELECT `account_id` FROM `login`"; [email protected]$ = [email protected]$ + " WHERE `group_id` < 99"; [email protected]$ = [email protected]$ + " AND `account_id` <> "+getcharid(3); [email protected]$ = [email protected]$ + " AND `account_id` NOT IN (SELECT `account_id` FROM `vendings` AND `autotrade` > 0)"; [email protected]$ = [email protected]$ + " AND `account_id` NOT IN (SELECT `account_id` FROM `buyingstores` AND `autotrade` > 0)"; [email protected]$ = [email protected]$ + " AND `"+.sql_field$+"` IN (SELECT `"+.sql_field$+"` FROM `login` WHERE `account_id` = "+getcharid(3)+")"; [email protected] = query_sql([email protected]$, [email protected]); [email protected]_aid = getcharid(3); if ([email protected]) { for ([email protected] = 0; [email protected] < [email protected]; [email protected]++) { if (attachrid([email protected][[email protected]])) { if (strcharinfo(3) == [email protected]$) { attachrid [email protected]_aid; dispbottom "[ BrasilRO ] Me desculpe, mas para evitar abusos, Double Clients não são permitidos nesse mapa."; atcommand "@kick " + strcharinfo(0); end; } } } } end; }
  13. function deleteItem { [email protected]_req_ratio = 1; if (@rebirth_type == 1 && ) [email protected]_req_ratio = max(1, (rebirth_no / 20)); for ([email protected]=0 ; [email protected] < .size_item; [email protected] += 3 ){ if ( !( getarg(0)&(.item_req[[email protected]+2]) ) ){continue;} delitem .item_req[[email protected]], ( .item_req[ [email protected]+1 ] * [email protected]_req_ratio); } return; } function CheckItemNeed { if ( Weight > 200000 ) { mes "You must reduce your weight to 2000 to do Rebirth."; close; } [email protected]_req_ratio = 1; if (@rebirth_type == 1 && ) [email protected]_req_ratio = max(1, (rebirth_no / 20)); [email protected] = 0; for ([email protected]=0 ; [email protected] < .size_item; [email protected] += 3 ){ if ( !( getarg(0)&(.item_req[[email protected]+2]) ) ){continue;} if ( countitem( .item_req[[email protected]] ) < (.item_req[ [email protected]+1 ] * [email protected]_req_ratio) ) { mes "You Require [^ff0000"+countitem( .item_req[[email protected]] )+" / "+ (.item_req[ [email protected]+1 ] * [email protected]_req_ratio) +"^000000] ^112FD9"+getitemname( .item_req[[email protected]] )+"^000000"; [email protected] = 1; }else{ mes "You Require [^00ff00"+countitem( .item_req[[email protected]] )+" / "+ (.item_req[ [email protected]+1 ] * [email protected]_req_ratio) +"^000000] ^112FD9"+getitemname( .item_req[[email protected]] )+"^000000"; } } if ([email protected] && !getarg(1,0)){close;} return; } change the both script function that calculate and display then delete the required items.
  14. Emistry

    Cash Point

    OnPCLoginEvent: if (#GetCashFree) { dispbottom "You gained 100,000 cashpoint!!! Enjoy!"; #CASHPOINTS += 100000; #GetCashFree = 1; } end; A permanent global account variable stored by the login server is more than enough, unless ur server support multiple different char-server
  15. if you have zero idea how to install and load a NPC script, you can start by reading the wiki. https://github.com/rathena/rathena/wiki/Adding-a-Script#adding-and-activating-scripts
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.