Jump to content

Emistry

Forum Moderator
  • Posts

    10018
  • Joined

  • Days Won

    408

Everything posted by Emistry

  1. if (getitemname(.@itemid) != "null") {
  2. probably your setup resolution? hmm
  3. set .@size, query_sql("SELECT c.`name`, cbg.`rank_points`, c.`division` FROM `char_bg` cbg INNER JOIN `char` c ON c.`char_id` = cbg.`char_id` WHERE cbg.`rank_points` > 0 ORDER BY cbg.`rank_points` DESC LIMIT "+ .top, .@name$, .@points, .@levelname$);
  4. - script Sample -1,{ OnInit: setarray .Map$[0],"prontera","payon","izlude"; setarray .MVP[0],1751,1832,1252,1648; end; OnHour00: OnHour08: killmonster .Map$[ .RandMap ],"All"; if( .event_timer%8 ) end; .event_timer++; set .RandMap,rand( getarraysize( .Map$ ) ); set .RandMVP,rand( getarraysize( .MVP ) ); monster .Map$[ .RandMap ],0,0,"MVP Event",.MVP[ .RandMVP ],1,strnpcinfo(0)+"::OnKilled"; announce "MVP "+getmonsterinfo( .MVP[ .RandMVP ],0 )+" Telah Merusak Kota "+.Map$[ .RandMap ]+" . Seseorang Harus membantu!!",0; initnpctimer; end; OnKilled: announce "MVP telah Mati. Kota telah Aman.",0; OnTimer3600000: killmonster .Map$[ .RandMap ],"All"; stopnpctimer; end; }
  5. something like this ? - script atcmd_example -1,{ OnInit: bindatcmd "guide",strnpcinfo(3) + "::OnAtcommand"; end; OnAtcommand: if (.@atcmd_numparameters < 2) { dispbottom "Usage: "+.@atcmd_command$+" <job> <name>"; } else { .@job = aoit(.@atcmd_parameters$[0]); for (.@i = 1; .@i <= .@atcmd_numparameters; .@i++) .@name$ += ((.@i > 1) ? " ":"") + .@atcmd_parameters$[.@i]; .@aid = getcharid(3, .@name$); if (.@aid && jobname(.@job) != "null") { mes "Turn "+.@name$+" into "+jobname(.@job)+"?"; if (select("Yes", "No") == 1) { close2; attachrid(.@aid); jobchange .@job; } } else { dispbottom "Usage: "+.@atcmd_command$+" <job> <name> - invalid player or job."; } } end; }
  6. add this item id and the function script // ...,{ callfunc("func_ItemClass", Job_Swordman, 10, 69); }, { }, { } function func_ItemClass { .@class = getarg(0, Job_Novice); .@min = getarg(1, 1); .@max = getarg(1, 99); if (.@class) { if (BaseLevel >= .@min && BaseLevel <= .@max) jobchange .@class; } return; }
  7. you can try something like this. - script sample -1,{ OnInit: .map$ = "geffen"; setmapflag .map$, mf_loadevent; end; OnPCLoadMapEvent: if (strcharinfo(3) == .map$) { .@size = query_sql("SELECT c.`account_id` FROM `char` c INNER JOIN `login` acc ON acc.`account_id` = c.`account_id` WHERE c.`account_id` <> "+getcharid(3)+" AND c.`online` = 1 AND acc.`last_ip` = '"+getcharip()+"'", .@aid); .@cid = getcharid(0); for (.@i = 0; .@i < .@size; .@i++) if (attachrid(.@aid)) { if (strcharinfo(3) == .map$) { .@count++; if (.@count >= 2) { warp "SavePoint", 0, 0, .@cid; end; } } } } end; } you should just disable dual client feature when diff the client. and implement client hash checking to avoid other using custom hexed client to bypass that. -- seem like i read wrong the topic contents
  8. Emistry

    Random PvP

    - script Sample -1,{ OnInit: .map$ = "prontera"; end; OnMinute00: // every hour deletearray .aid; mapwarp .map$, "prontera", 155, 181; query_sql("SELECT `account_id`,`char_id`,`name` FROM `char` WHERE `online` = 1 ORDER BY RAND() LIMIT 2", .aid, .@cid, .@name$); announce "<SYSTEM> Both '"+.@name$[0]+"' and '"+.@name$[1]+"' are selected to join the event. Good luck in killing each other for rewards", bc_all; warp .map$, 0, 0, .@cid[0]; warp .map$, 0, 0, .@cid[1]; end; OnPCKillEvent: if (strcharinfo(3)) { .@aid = getcharid(3); if (killedrid == .@aid) .@aid = .aid[(.@aid == .aid[0])]; if (attachrid(.@aid)) { // rewards getitem 512, 1; getitem 512, 2; getitem 512, 3; announce "<SYSTEM> '"+strcharinfo(0)+"' has won.", bc_all; } } deletearray .aid; mapwarp .map$, "prontera", 155, 181; end; } try this.
  9. merge the changeset and use a client with date 20180321 or above
  10. // ======================================================= // Team Rewards // ======================================================= if( .Guillaume_Score > .Croix_Score ) { // Ganó Guillaume bg_item($@FlaviusCTF_id1, 1); bg_item($@FlaviusCTF_id2, 0); } else if( .Croix_Score > .Guillaume_Score ) { // Ganó Croix bg_item($@FlaviusCTF_id1, 0); bg_item($@FlaviusCTF_id2, 1); } else { // Empate, perdida ambos por default bg_item($@FlaviusCTF_id1, 0); bg_item($@FlaviusCTF_id2, 0); } donpcevent strnpcinfo(3)+"::OnAddPoint"; // <------ ADD THIS and add this part OnAddPoint: if( .Guillaume_Score > .Croix_Score ) .@bg_id = $@FlaviusCTF_id1; else if( .Croix_Score > .Guillaume_Score ) .@bg_id = $@FlaviusCTF_id2; if (.@bg_id) { .@size = bg_get_data(.@bg_id, 1); copyarray .@arenamembers, $@arenamembers, .@size; for (.@i = 0; .@i < .@size; .@i++) { if (attachrid(.@arenamembers[.@i])) { atcommand "@addfame 2 100"; dispbottom "You gained 100 Fame for winning."; detachrid; } } } end;
  11. what you're doing are redundant works, the instance IdleTimeOut took care of all these. By default it has a value of 5 minutes, you should have just change the IdleTimeOut value to shorter value, like 5 seconds which you wanted. not to mention, your approaches also end up consume more resources that it should. beside its also the server responsibility to adjust and change the settings to fit their needs.
  12. you can follow the way how lhz mvp are summoned to control the pvp on/off. npc/re/mobs/dungeons/lhz_dun.txt however this will render your convex mirror into useless since monster spawn by script doesn't have the required "boss_monster" flag. using the permanent monster spawn script like above cant do what you want.
  13. item drop have grace period before can be loot by others conf/battle/drops.conf#L13-L36
  14. View File Manage @alootid - @alootid2 Introduction: Due to the limitation of alootid that can only loot up to 10 items by default. (can change at /src/). However players are always greedy, they want to loot almost everything, but not every items, so 10 slots can't fill their desires. So this custom manager are introduced. It help player to setup different combination of alootid settings. (Different hunting monster/maps could switch to different settings) player no longer worry what their previous alootid settings was. player can switch/save any settings whenever they want. alootid settings could be auto loaded when they join the game. * In short, just a macro to use to the alootid atcommand. To make it less confusing to player, disable the alootid and start using alootid2 instead. Usage: @alootid2 list @alootid2 <save/add/remove> <#> <item1> ... <item10> @alootid2 <load/clear/reset> <#> @alootid2 set <#> name <name> @alootid2 set <#> autoload <1/0> Example: chatbox: @alootid2 save 3 609 608 607 Usage: @alootid2 save <3> - save successfully. chatbox: @alootid2 load 1 Your autolootitem list has been reset. Autolooting item: 'Green_Herb'/'Green Herb' {511} Autolooting item: 'Apple'/'Apple' {512} Autolooting item: 'Banana'/'Banana' {513} Autolooting item: 'Grape'/'Grape' {514} Autolooting item: 'Carrot'/'Carrot' {515} Usage: @alootid2 load <2> - loaded successfully. chatbox: @alootid2 list <1> - 501, 502, 503, 504, 505, 506, 507, 508, 509, 510 <2> - 511, 512, 513, 514, 515 (autoload upon login) <3> - 609, 608, 607 Usage: @alootid2 list - found 3 settings. Preview: Submitter Emistry Submitted 09/15/2019 Category Utilities Video Content Author Emistry  
  15. - script atcmd_example -1,{ OnInit: bindatcmd("rentitem", strnpcinfo(3)+"::OnAtcommand"); end; OnAtcommand: .@itemid = atoi(.@atcmd_parameters$[0]); if (getitemname(.@itemid) != "null") { if (getiteminfo(.@itemid, 2) != IT_CARD) { if (.@second > 0) rentitem .@itemid, (24 * 60 * 60); // 1 day end; } dispbottom .@atcmd_command$+" - You cant rent "+getitemname(.@itemid); } else { dispbottom .@atcmd_command$+" - invalid item #"+.@itemid; } end; } try renting a card type item will create an exploit where player can remove the rental duration when they insert into an equipment.
  16. npc/custom/quests/quest_shop.txt change getitem into rentitem and equivalent parameter values.
  17. change set .@size, query_sql( "select char_id, rank_points, division from char_bg where rank_points > 0 order by rank_points desc limit "+ .top, .@name$, .@points, .@levelname$ ); into set .@size, query_sql("SELECT c.`name`, cbg.`rank_points`, cbg.`division` FROM `char_bg` cbg INNER JOIN `char` c ON c.`char_id` = cbg.`char_id` WHERE cbg.`rank_points` > 0 ORDER BY cbg.`rank_points` DESC LIMIT "+ .top, .@name$, .@points, .@levelname$); join the `char` table to retrieve the character name.
  18. spend a minutes to search on forum or google or wiki could have gotten you the answers..
  19. Version 2.0.0

    638 downloads

    Introduction: Due to the limitation of alootid that can only loot up to 10 items by default. (can change at /src/). However players are always greedy, they want to loot almost everything, but not every items, so 10 slots can't fill their desires. So this custom manager are introduced. It help player to setup different combination of alootid settings. (Different hunting monster/maps could switch to different settings) player no longer worry what their previous alootid settings was. player can switch/save any settings whenever they want. alootid settings could be auto loaded when they join the game. * In short, just a macro to use to the alootid atcommand. To make it less confusing to player, disable the alootid and start using alootid2 instead. Usage: @alootid2 list @alootid2 <save/add/remove> <#> <item1> ... <item10> @alootid2 <load/clear/reset> <#> @alootid2 set <#> name <name> @alootid2 set <#> autoload <1/0> Example: chatbox: @alootid2 save 3 609 608 607 Usage: @alootid2 save <3> - save successfully. chatbox: @alootid2 load 1 Your autolootitem list has been reset. Autolooting item: 'Green_Herb'/'Green Herb' {511} Autolooting item: 'Apple'/'Apple' {512} Autolooting item: 'Banana'/'Banana' {513} Autolooting item: 'Grape'/'Grape' {514} Autolooting item: 'Carrot'/'Carrot' {515} Usage: @alootid2 load <2> - loaded successfully. chatbox: @alootid2 list <1> - 501, 502, 503, 504, 505, 506, 507, 508, 509, 510 <2> - 511, 512, 513, 514, 515 (autoload upon login) <3> - 609, 608, 607 Usage: @alootid2 list - found 3 settings. Preview:
    Free
  20. callfunc("func_UpdateCampFire", <range>, <duration>, <heal_rate>); // update the campfire duration/heal rate.
  21. you can try add this before the item search filter if (atoi(message) >= 30000) { clif_displaymessage(fd, msg_txt(sd,19)); // Invalid item ID or name. return -1; }
  22. #CASHPOINTS -= .vip_cashpoint[.@i]; vip_time (.vip_day[.@i] * 1440); // 30 days VIP if (.@i == 2) { getitem 501, 1; getitem 501, 2; getitem 501, 3; } mes .npc$; mes "Congratulations you just got "+.vip_day[.@i]+" days VIP."; close; change to this.
  23. check your char server connection see if its connection the correct database. conf/inter_athena.conf
  24. you could use these instead. *groupranditem <group id>{,<sub_group>}; Returns the item_id of a random item picked from the group specified. The different groups and their group number are specified in 'db/(pre-)re/item_group_db.txt'. When used in conjunction with other functions, you can get a random item. For example, for a random pet lure: getitem groupranditem(IG_Taming),1; 'sub_group' is used to get the available random items of item group from specified random group. 0 for 'must' item group, and random item group is 1 until 5 (MAX_ITEMGROUP_RANDGROUP+1). More info, see doc/item_group.txt. --------------------------------------- *getrandgroupitem <group_id>{,<quantity>{,<sub_group>{,<identify>{,<char_id>}}}}; Similar to the above example, this command allows players to obtain the specified quantity of a random item from the group "<group id>". The different groups and their group number are specified in db/(pre-)re/item_group_db.txt If 'quantity' is not defined or 0, it will uses defined amount from Item Group list. If 'sub_group' is not defined the value will be 1 (since random group is 1 ~ 5, and 0 is 'must' item group). For item with type IT_WEAPON, IT_ARMOR, IT_PETARMOR, and IT_SHADOWGEAR will be given as unidentified item (as defined by itemdb_isidentified in src/map/itemdb.cpp) except if 'identify' is defined with value 1. More info, see doc/item_group.txt. --------------------------------------- *getgroupitem <group_id>{,<identify>{,<char_id>}}; Gives item(s) to the attached player based on item group contents. This is not working like 'getrandgroupitem' which only give 1 item for specified item group & sub_group. For item with type IT_WEAPON, IT_ARMOR, IT_PETARMOR, and IT_SHADOWGEAR will be given as unidentified item (as defined by itemdb_isidentified in src/map/itemdb.cpp) except if 'identify' is defined with value 1. More info, see doc/item_group.txt.
×
×
  • Create New...