Jump to content

Lord Ganja

Members
  • Content Count

    161
  • Joined

  • Last visited

  • Days Won

    1

Reputation Activity

  1. Like
    Lord Ganja got a reaction from Kyoya G in get rid of less than overcharged selling price warning   
    Okay, I intentionally added an item with less than overcharged selling price.
    Now I was thinking if I can get rid of the warnings that appear by adding the item id to the source so it won't show the warning even if these 'ids' are less than overcharged selling price.
     
    For example, if I set the id 607 less than overcharged selling price. I'll add the id 607 to the src so the warning won't appear.
     
     ' if( type == SHOP && value*0.75 < id->value_sell*1.24 && itemid != 607) { ' <== This is just my idea for excluding items id's.
     
     
    How do I do that?   Thanks in advance.
     
     
    this is the part in npc.c 
    if( type == SHOP && value*0.75 < id->value_sell*1.24 ) { // Exploit possible: you can buy and sell back with profit ShowWarning("npc_parse_shop: Item %s [%d] discounted buying price (%d->%d) is less than overcharged selling price (%d->%d) in file '%s', line '%d'.n", id->name, nameid, value, (int)(value*0.75), id->value_sell, (int)(id->value_sell*1.24), filepath, strline(buffer,start-buffer)); if (retval) *retval = EXIT_FAILURE;}  
  2. Upvote
    Lord Ganja reacted to AnnieRuru in *setmobdata & *getmobdata   
    need to summon a hp 10,000,000 poring ?
    or you want to make emperium move ?
    yes, this plugin allows you to customize your monsters attribute
     
    Download : 1.2
    patch <-- rathena fellows, you are welcome to plagiarize this command, since your setunitdata can't change stats LOL
     
    I experienced in the past that, sometimes when my internet connection reset, my post will looks like rubbish
    this time I will make multiple posts to reduce the risk of my explanation so they wont get edited
     
     
     
  3. Upvote
    Lord Ganja reacted to AnnieRuru in How do I get of an error like this? npc_event: event not found   
    @@Lord Ganja
    that method was old, you probably got this script from eathena forum
    EDIT: found it -> https://www.eathena.ws/board/index.php?s=&showtopic=177722&view=findpost&p=1001559
    at that time, *monster and *clone command doesn't return the GID
     
    now that these command returns the GID of the monster, don't have to do that anymore
     
    - script clonecheck FAKE_NPC,{OnInit: setitemscript Bow, "{ getmapxy .@map$, .@x, .@y, 0; @bow_clone = clone( .@map$,.@x,.@y,"clonecheck::OnDead", getcharid(0), getcharid(0), 0x8D, 1, 40 ); }", 1; setitemscript Bow, "{ unitkill @bow_clone; @bow_clone = 0; }", 2;OnDead: end;}.btw move to script support
     
    EDIT : forgot to set @bow_clone back to 0 ... again ... need to fix this bad habit
  4. Upvote
    Lord Ganja reacted to Dastgir in Mode so clones cannot be freezed ?   
    0x8D =
    0x80+0x8+0x4+0x1 =
    MD_CANATTACK+MD_ASSIST+MD_AGGRESSIVE+MD_CANMOVE
     
    btw, Its Hexadecimal Number.
     
    You can refer to https://raw.githubusercontent.com/HerculesWS/Hercules/master/doc/mob_db_mode_list.txt for Modes.
  5. Upvote
    Lord Ganja reacted to raPalooza~ in Increase monster attack & skill damage rate on map   
    A while ago i've made a source modification that did exacly that!
    I was using this to create a setmapflag command to increase mobpower on an instance, creating somekind of "Greater Rift" from Diablo, with infinity dificulty scale depending on the level that the player have already cleared.
    Example( instance level30 = mobpower 3000% ).

    I used the jexp/bexp mapflag as a base, as it is 100% on all non-set maps, and then i've called the mapflag values on the mob_spawn(mob.c);
         int m = md->bl.m; if( map->list[m].mobpower != 100){ md->level = md->level * map->list[m].mobpower/100; md->status.max_hp = (md->status.max_hp * map->list[m].mobpower)/100; md->status.max_sp = (md->status.max_sp * map->list[m].mobpower)/100; md->status.hp = (md->status.hp * map->list[m].mobpower)/100; md->status.sp = (md->status.sp * map->list[m].mobpower)/100; md->status.str = (md->status.str * map->list[m].mobpower)/10 md->status.batk = (md->status.batk * map->list[m].mobpower)/100; md->status.rhw.atk= (md->status.rhw.atk * map->list[m].mobpower)/100;; md->status.rhw.atk2= (md->status.rhw.atk2 * map->list[m].mobpower)/100; md->status.lhw.atk= (md->status.rhw.atk * map->list[m].mobpower)/100;; md->status.lhw.atk2= (md->status.rhw.atk2 * map->list[m].mobpower)/100; } md->attacked_id = 0; md->target_id = 0; md->move_fail_count = 0; I've lost all the source files ;ooo.
    I know that's not a tutorial, but i hope it gives you a good start or inspiration.

    ;]
  6. Upvote
    Lord Ganja reacted to Winterfox in How to get the index of an array variable?   
    @@Lord Ganja
     
    Depends on what you want to do. If you wan't to use the index to check for a specific value you could do it like this:
    setarray .@mob_ids, 1002, 1003, 1004, 1005;.@mob_id = 1004;for(.@i=0; .@i < getarraysize(.@mobIds); .@i++) {   .@blacklist[.@mobIds[.@i]] = 1;}if(!.@blacklist[.@mob_id]) { // Do something} But thats only worth if you want to have some kind of black/white list. Since if you iterate trough it depending on what you store you will get a pretty high index and will have to iterate over tons of empty values.

    You also could do something like this:
    setarray .@mob_ids$, 1002, 1003, 1004, 1005;.@mob_id$ = 1004;if(strcmp(":" + .@mob_id$ + ":", implode(.@mob_ids$, ":")))  {   // Do something.} If you really want a way to easily get the index to a value you would need to do it like that i guess:
    setarray .@mob_ids, 1002, 1003, 1004, 1005;.@mob_id = 1005;for(.@i=0; .@i < getarraysize(.@mob_ids); .@i++) {   .@mob_ids_lookup[.@mob_ids[.@i]] = .@i;}mes getmonsterinfo(.@mob_ids[.@mob_ids_lookup[.@mob_id]], 0);close;
  7. Upvote
    Lord Ganja reacted to iCORE in FluxCP Vote for Points?   
    Private message me i will try to fix it for you
  8. Upvote
    Lord Ganja reacted to iCORE in FluxCP Vote for Points?   
    http://herc.ws/board/topic/10762-re-release-paradox-vote-for-points/
     
    hope this will help
  9. Upvote
    Lord Ganja reacted to Gerz in Enabling HighJump on noteleport mapflag   
    if( strcmp(map->list[src->m].name,"pvp_room") != 0 && map->list[src->m].flag.noteleport && !(map->list[src->m].flag.battleground || map_flag_gvg2(src->m)) ) {
  10. Upvote
    Lord Ganja reacted to Ai4rei in RO Credentials (ROCred), v1.10.0 - last updated 2017/12/31   
    ActionType=0 (1 if you want to make the launcher close)ActionData=PatcherName.exe Edit:Updated to 1.9.2, adds support for ASLR/DEP. Some code maintenance.
  11. Upvote
    Lord Ganja reacted to Angelmelody in checking offline char_id   
    you can use charid2rid CMD to check whether the player is online or not
      if(charid2rid(.@char_id[.@i]))dispbottom "....";
     
  12. Upvote
    Lord Ganja reacted to ossi0110 in is it possible to encrpyt .INI files?   
    you can embed the ini file of rocred into the exe self , 
     
    just read the topic from rocred
     
     
    http://herc.ws/board/topic/1466-ro-credentials-rocred-v191-last-updated-20150108/
  13. Upvote
    Lord Ganja reacted to Angelmelody in Top 10 PK Killers with lists of characters   
    ok updated
    .@nb = query_sql("select `name`, r.value, `online` from `char` as c INNER JOIN( select `account_id`, `value` from `acc_reg_num_db` WHERE `key` ='#PK_Points' AND `value` > 0 GROUP BY `account_id` order by `value` desc limit 10) as r on c.account_id = r.account_id order by r.value desc,char_num asc", .@name$, .@value, .@online); if(.@nb) mes "Top "+( ++.@j)+" - Points: "+.@value[.@i]; for( .@i = 0; .@i < .@nb; .@i++ ) { if(.@i ) { if(.@value[.@i] != .@value[.@i-1] ){ if(!.@k){ mes " > [Offline]"; } mes "Top "+(++.@j)+" - Points: "+.@value[.@i]; .@k = 0; } if(!.@k && .@i == (.@nb-1) ) { mes " > [Offline]"; } } if(.@online[.@i]) { mes " > "+ .@name$[.@i]; .@k++; } }
  14. Upvote
    Lord Ganja reacted to Angelmelody in Top 10 PK Killers with lists of characters   
    index goes to -1 XD, now should be fixed ...try again...
    .@nb = query_sql("select `name`, r.value, `online` from `char` as c INNER JOIN( select `account_id`, `value` from `acc_reg_num_db` WHERE `key` ='#PK_Points' AND `value` > 0 GROUP BY `account_id` order by `value` desc limit 10) as r on c.account_id = r.account_id order by r.value desc,char_num asc", .@name$, .@value, .@online); if(.@nb) mes "Top "+( ++.@j)+" - Points: "+.@value[.@i]; for( .@i = 0; .@i < .@nb; .@i++ ) { if(.@i ) { if(.@value[.@i] != .@value[.@i-1] ){ mes "Top "+(++.@j)+" - Points: "+.@value[.@i]; } } mes " > "+ .@name$[.@i] +" "+( ( .@online[.@i] )? "^00FF00[Online]" : "^FF0000[Offline]" )+"^000000"; }
  15. Upvote
    Lord Ganja reacted to Garr in getequipistradable & getitemistradable [Help]   
    Well, I see few problems with checking if item is bound, since you'll need to check some specific item, as it is stored inside item itself. If you plan to delete it afterward you'll need to delete it by its index, and I believe there's no command to do that by default. And that there can be both bound and non-bound item inside player inventory does not make it easier. Albeit delitem prefers normal items over bound/carded ones, but don't take my word for it.
    For the flag checking you can use this command that was made for me by a friend long ago:
    /* [List of Restrictions] ITR_NONE 0 ITR_NODROP 1 ITR_NOTRADE 2 ITR_PARTNEROVERRIDE 4 ITR_NOSELLTONPC 8 ITR_NOCART 16 ITR_NOSTORAGE 32 ITR_NOGSTORAGE 64 ITR_NOMAIL 128 ITR_NOAUCTION 256 ITR_ALL 511 Usage in scripts: chk_restrictions(ItemID);*/BUILDIN(chk_restrictions) { struct item_data *item_info; int item_id, item_tradable; item_id = script_getnum(st,2); //Value sent by the script (Item ID) if(itemdb->exists(item_id)) item_info = itemdb->search(item_id); else { script_pushint(st,-1); //If the ID is invalid it stops here and returns -1 return true; } item_tradable = item_info->flag.trade_restriction; script_pushint(st, item_tradable); //Returns the sum of restrictions return true;} It returns combined value of restrictions on item, so if you want to check if it's tradeable, then
    chk_restrictions(item)&2
    must be 0.
    Makes it easy to use inside ifs:
    if( chk_restrictions(item)&2 ) { // Item is non-tradeable, prevent script from advancing}
  16. Upvote
    Lord Ganja reacted to Dastgir in [Request] A Daily Lucky Spin Like this?   
    Why buy, when we can make it free
  17. Upvote
    Lord Ganja reacted to Dastgir in OnPCUseSkillEvent question   
    its like that only
     
    pc_setreg( sd, add_str( "@useskilltarget" ), bl->id );  ^ That means , give the monster internal id assigned by server, not the mob class.
    you can add below it
     
    if (bl->type == BL_MOB)  pc->setreg( sd, script->add_str( "@useskilltargetid" ), ((TBL_MOB*)bl)->class_ ); And in Script change this
     
    dispbottom "id: "+ @useskillid +" | lv: "+ @useskilllv +" | target "+ @useskilltarget;  To
     
    dispbottom "id: "+ @useskillid +" | lv: "+ @useskilllv +" | target "+ @useskilltarget +" | TargetID: "+ @useskilltargetid;  @useskilltargetid will only be set if its a monster...
  18. Upvote
    Lord Ganja reacted to Dastgir in Mini item description window   
    At bottom right of window, you can drag and resize the window...
  19. Upvote
    Lord Ganja reacted to Angelmelody in Help with this script   
    try 'detachrid' then kick the 'rid2name( $@onlineaid[.@i])' , I think it should work on @AT state vendors
    event_wroom,34,157,4 script kickertest 100,{ getmemberaid ALL_SAMEMAP, "event_wroom"; freeloop(1); for( .@i = 0; .@i < $@onlinecount; .@i++ ) { if( attachrid($@onlineaid[.@i]) && strcharinfo(3) == "event_wroom" && checkvending() ) { mapannounce "event_wroom", rid2name( $@onlineaid[.@i]),0; detachrid; atcommand "@kick "+rid2name( $@onlineaid[.@i]); } } freeloop(0); $@onlinecount = 0; deletearray $@onlineaid; end;}
  20. Upvote
    Lord Ganja reacted to Angelmelody in Enchantment System   
    BUILDIN_DEF(successenchant,"ii"),
     
    change into
     
    BUILDIN_DEF(successenchant,"iii"),
  21. Upvote
    Lord Ganja reacted to Dastgir in [Guide] How to add Custom Jobs   
    src/map/map.h:MAPID_AKATSUKI = 0x11
    Other 2 should be
    0x12 and 0x13
  22. Upvote
    Lord Ganja reacted to Neo-Mind in [Guide] How to add Custom Jobs   
    Introduction
         For our Example we will create the Custom Class "Shinobi" and its Child version i.e. "Baby Shinobi" along with their Cash Mounts/Halter Mounts. Each Job has 3 ID values :
     
    1) Job ID - we will use 4230 & 4231 respectively for the jobs (4232 & 4233 will be reserved for the mounts client side).   2) Map ID - Also called EA Mask. If we are extending a class we OR the existing class with a modifier. Since Shinobi is going to be a seperate branch, we will use 0x11 for Shinobi and 0x11 | 0x2000 for Baby Shinobi (0x2000 is the JOBL_BABY mask).   3) Msg ID - Defined in messages.conf file. We will use 700 and 701.   Before we begin, A few points to note:
    1) For the client side i will be using my own patch from NEMO not Xray clients - So dont ask me about Xray.
     
    2) This guide is meant to be an overview towards adding jobs - meaning that your job will be enabled once you have done the changes     specified here . You can add further details on your own which depends on your Class.
     
    3) If i am missing out on anything please let me know. Nobody is perfect including me
     
    4) We will use Sprite and some data from Ninja class for the time being but you can add your own entries just as easily.
     
     
    Server Source 1) src/common/mmo.h: look for JOB_REBELLION assignment and insert our Job IDs after it.      
     
    2) src/map/map.h: look for MAPID_BABY_CHASER and insert our Map IDs after it.         3) src/map/pc.c:     i) find case JOB_BABY_CHASER: and insert our cases after it       ii) find case MAPID_BABY_CHASER: and insert our cases after it         iii) find case JOB_REBELLION: followed by return msg_txt(655); and insert our cases after it. (returns the Msg ID)       iv) find { "Rebellion", JOB_REBELLION }, and insert our Job Names after it       4) src/map/itemdb.c: Here we check the job masks that is specified in item_db.conf. There is one limitation, however.     Currently there is only 1 more slot left in the job mask since it is 32 bit. In case you need to add more you will need to     change the variable to 64 bit.         Find jobmask & 1<<30 and insert our class check after it.         5) src/char/inter.c: Find case JOB_REBELLION: and insert our case after it.(returns the Msg ID)         Server Config 1) db/const.txt:       i) Find Job_Rebellion and insert our Job IDs after it       ii) Find EAJ_BABY_CHASER and insert our Map IDs after it         2) db/<pre-re|re>/exp.txt: Insert your IDs in one of the entries (or if you want to specify your own exp per level you can add that).    Since our jobs are meant to be amongst First Class, we will simply add it into existing ones.       i) Base:     ii) Job:   3) db/<pre-re|re>/job_db.conf: Add entry for your Job. We will copy the entry from Ninja with slight changes for now.         4) db/job_db2.txt: Add entry for your Job. Again we will reuse the data from Ninja.         5) conf/help.txt: Insert your class entries to the @go message         6) conf/messages.conf: Add the Msg IDs after Shadow Chaser T         7) db/<pre-re|re>/skill_tree.conf: Add entry for your Job similar to the others.      -pic to be added-     Client Lua Files Now to make the client support Custom Jobs it should be patched with "Enable Custom Jobs" patch in NEMO.  Also you should copy the lua files inside Support folder to different area so we can Add entries of our jobs.  (LuaFiles514/Lua Files/Admin folder inside is what we need essentially)   1) PCIDs.lub :     i) First we add all our Job IDs (look for JT_2004_JOB_LAST entry).       ii) Next we connect the Cash Mount Job IDs to Main Job IDs (Look for JT_REBELLION mapping).         iii) Lastly we need to add our Baby Class & its mount to the Baby_List (Look for JT_LION_CRUSADER_B).       2) PCNames.lub: To illustrate that different names can be assigned based on gender, I am calling them as Shinobi M & Shinobi F for Male & Female respectively.     i) First we add the Job Name for Male Characters (Look for Rebellion)     ii) Next we make the Cash Mounts inherit Names from their respective Main Jobs - since Mounting don't change the name (Look for JT_PECO_REBELLION).         iii) Last but not least we add the Job Name for Female characters - Only necessary if it differs from Male name (Look for JT_SORCERER_B).       3) PCPaths.lub: Here we specify the job specific prefix used by the client to get the job sprite.   i) First we add the Path prefix for Jobs that is not shared with any existing ones.       ii) Next we make the Jobs that has shared path inherit from existing (for e.g. Baby Jobs inherit from Adult versions).   4)PCHands.lub: Here we specify the job specific prefix used by the client to get the weapon and shield sprite locations     i) Like before, First we add the Hand prefix for Jobs that is not shared with any existing ones.     ii) Next we make the Jobs with shared prefix inherit from existing (e.g. Baby Jobs, Mounts, Baby Mounts etc. all can inherit from Adult versions).   5)PCPals.lub: Here we specify the job specific prefix used by the client to get the Palette file location.     i) Like before, First we add the Pal prefix for Jobs that is not shared with any existing ones.     ii) Next we make the Jobs with shared prefix inherit from existing (e.g. Baby Jobs, Mounts, Baby Mounts etc. all can inherit from Adult versions).     Note: You can also optionally add entries in PCImfs.lub file in case you have an Imf file, but I haven't seen any issues even without it.  Hence I am not pursuing it.   Once the edits are done pack it into your grf or put it in your data folder and use it. With this much your job will be visible and able to do everything provided you have the sprite files in the right location.   spriteÀΰ£Á·¸öÅë³²<pathprefix>_³².spr and act for Male Job  spriteÀΰ£Á·¸öÅë¿©<pathprefix>_¿©.spr and act for Female Job   Snapshot: (to be added)    
  23. Upvote
    Lord Ganja got a reaction from zackpinoy in pre-Renewal edit max level   
    edit mo sa db/pre-re/exp.txt
  24. Upvote
    Lord Ganja got a reaction from MikZ in char server connection lost   
    If it says 'passed', you can use it and try if it works..
    AFAIK it also supports 20130807 clients.
     
    and if you think you already set all things correctly but errors occured like [info]: clif_parse: Disconnecting session #3 with unknown packet version (p:0x464d,l:19).
    try to generate another key..
     
    just make sure that you
    always replace the packetkeys 1st to 3rd in packets.h with your new packetkeys
    always diff your client with your new packetkeys
    and also don't forget to recompile.
  25. Upvote
    Lord Ganja got a reaction from MikZ in char server connection lost   
    If you're using an old client from rathena, you probably diffed it with 'disable packet encryption' and on server side you enabled the 'packet obfuscation'.
    Try to use Nemo - Client Patcher to diff your client
     
    Look for your client version at src/map/packets.h and diff your client packetkeys with the same packetkeys on packets.h
×
×
  • Create New...

Important Information

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