Jump to content

sader1992

Content Moderator
  • Posts

    1677
  • Joined

  • Last visited

  • Days Won

    71

Community Answers

  1. sader1992's post in Excluding Doram from an NPC was marked as the answer   
    at the start
    if(Class == 4218) end;  
  2. sader1992's post in script npcload failed was marked as the answer   
    try @reloadnpc
    the npc already loaded , you can't load it twice
    @reloadnpc
    or @unloadnpcfile
    than
    @loadnpc
     
    also , did you edit the npc file ?
    the npc is depend on the duplicate if you didn't edit it
    why not adding it to your conf file and @reload script , so it would be always loaded ?
  3. sader1992's post in Script - Spawn MVP only after the previous one is dead was marked as the answer   
    - script respawnMvp -1,{ OnInit: setarray .mob_id[0],1857,1002,1031,1113,1613,1836; .monster = .mob_id[rand(getarraysize(.mob_id))]; monster "prontera",154,172,"--en--", .monster, 1, "respawnMvp::OnKill"; announce "MVP "+getmonsterinfo(.monster, 0)+" has spawned!",0; end; OnKill: announce getmonsterinfo(.monster, 0)+ " was killed by "+strcharinfo(0)+".",0; .monster = .mob_id[rand(getarraysize(.mob_id))]; monster "prontera",154,172,"--en--", .monster, 1, "respawnMvp::OnKill"; announce "MVP "+getmonsterinfo(.monster, 0)+" has spawned!",0; end; }  
  4. sader1992's post in modify required item was marked as the answer   
    just before you delete the zeny
    set Zeny, Zeny-.s_zeny; add
    if(!countitem(7716)){ mes "you need 1 " + getitemname(7716) + " to complete the enchantment."; end; } delitem 7716,1;  
  5. sader1992's post in Script with Random Percentage - Help to define was marked as the answer   
    it look for me in the video your script all about chances , so i am not sure what you are asking about
    its as simple as
    if(rand(1,100) < 76){ //75% chance (the result is between and includes 1 and 75) }else{ //25% chance (the result is else) }  
  6. sader1992's post in About hidden NPCs was marked as the answer   
    it's not recommended . but you can use this command
    *classchange(<view id>{,"<NPC name>","<flag>"});
    read the command info to know why it's not recommended
    also you will need to do a lot of extra code to keep your npc the way you want the player to see (read the command information)
    --------------------------------------- *classchange(<view id>{,"<NPC name>","<flag>"}); This command is very ancient, its origins are clouded in mystery. It will send a 'display id change' packet to everyone in the immediate area of the NPC object, which will supposedly make the NPC look like a different sprite, an NPC sprite ID, or a monster ID. This effect is not stored anywhere and will not persist (Which is odd, cause it would be relatively easy to make it do so) and most importantly, will not work at all since this command was broken with the introduction of advanced classes. The code is written with the assumption that the lowest sprite IDs are the job sprites and the anything beyond them is monster and NPC sprites, but since the advanced classes rolled in, they got the ID numbers on the other end of the number pool where monster sprites float. As a result it is currently impossible to call this command with a valid view id. It will do nothing whatsoever if the view ID is below 4047. Getting it to run will actually just crash the client. It could be a real gem if it can be gotten to actually do what it's supposed to do, but this will only happen in a later SVN revision. Empty <NPC name> means attached NPC. Target for <flag>: - bc_area : Sprite is sent to players in the vicinity of the source (default value). - bc_self : Sprite is sent only to player attached. ---------------------------------------  
  7. sader1992's post in set a variable for x times was marked as the answer   
    you don't need to define the variable before you use it, any new variable you use by default is int 0 string ""
    so you can right away
    if(#var < 11){
    //your code
    #var++;
    }
  8. sader1992's post in How to make invisible NPC?? was marked as the answer   
    https://github.com/rathena/rathena/blob/7f772c32d3be201861946bb64720c231828465ac/doc/script_commands.txt#L6456
     
    --------------------------------------- *hideonnpc "<NPC object name>"; *hideoffnpc "<NPC object name>"; These commands will make the NPC object specified display as hidden/visible, even though not actually disabled per se. Hidden as in thief Hide skill, but unfortunately, not detectable by Ruwach or Sight. As they are now, these commands are pointless, it is suggested to use 'disablenpc'/'enablenpc', because these two commands actually unload the NPC sprite location and other accompanying data from memory when it is not used. However, you can use these for some quest ideas (such as cloaking NPCs talking while hidden then revealing.... you can wonder around =P ---------------------------------------  
  9. sader1992's post in BOTKILLER 6 PLS was marked as the answer   
    https://github.com/rathena/rathena/commit/3e0d3d2fe6b244099d3987b7a21260d6b070512e
  10. sader1992's post in Jobname and Npcidentity was marked as the answer   
    you are asking a lot of questions
    i couldn't understand most of it
    i think you want to know how to add Custom NPC?
    this a short guide < do it and everything would work:
    SERVER_FILES: >src >>map >>npc.hpp EXAMPLE: JT_NPC_CUSTOM = 30000, >>script_constants.hpp EXAMPLE: export_constant_npc(JT_NPC_CUSTOM); CLIENT_FILES: >data >>sprite >>>npc >>>> //your npc spr/act here EXAMPLE: >>>>npc_test.act >>>>npc_test.spr >>luafiles514 >>>lua files >>>>datainfo >>>>>npcidentity.lub EXAMPLE: JT_NPC_CUSTOM = 30000, (THE ID MOST NOT BE ALREADY USED IN jobidentity.lub AND npcidentity.lub / THE ID MUST BE THE SAME AS THE SERVER npc.hpp) >>>>>jobname.lub EXAMPLE: [jobtbl.JT_NPC_CUSTOM] = "npc_test", recompile your server
    do not use already used IDS/NAMES
    "JT_" is important
    make sure the client read the files you edited first!!!! <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< READ THIS
    run your server
    now you can add the script in your server
    prontera,150,150,0 script my_costum_npc 30000,{} OR prontera,150,150,0 script my_costum_npc JT_NPC_CUSTOM,{} reloadscript and you will see your npc
  11. sader1992's post in How to enable Attendance System in 2018-06-21 client? was marked as the answer   
    you need to give the group you want the permission to use it
    https://github.com/rathena/rathena/blob/ce1508a01c68dee80544242b470987742f3b3ece/conf/groups.conf#L96
    attendance: true  
  12. sader1992's post in Hello there !!! i can create script open cash shop window with npc ? was marked as the answer   
    well if there is a bug you can report it in rathena's github
    also you can use npc shop to use cash shop and disable the cash shop
    check it out
    https://github.com/rathena/rathena/blob/ce1508a01c68dee80544242b470987742f3b3ece/doc/script_commands.txt#L283
  13. sader1992's post in How to add buff vip in healer script? was marked as the answer   
    if(vip_status(VIP_STATUS_ACTIVE)){ //vip buffs here }  
  14. sader1992's post in Help Barricade was marked as the answer   
    the script you give , is not a complete script so i can't give more detail than
    --------------------------------------- *mobcount("<map name>","<event label>") This function will count all the monsters on the specified map that have a given event label and return the number or 0 if it can't find any. Naturally, only monsters spawned with 'monster' and 'areamonster' script commands can have non-empty event label. If you pass this function an empty string for the event label, it will return the total count of monster without event label, including permanently spawning monsters. With the dynamic mobs system enabled, where mobs are not kept in memory for maps with no actual people playing on them, this will return a 0 for any such map. If the event label is given as "all", all monsters will be counted, regardless of having any event label attached. If the map name is given as "this", the map the invoking character is on will be used. If the map is not found, or the invoker is not a character while the map is "this", it will return -1. --------------------------------------- just at the start of the npc that spawn the monsters put
    if(mobcount("ars_fild58","EP7_abysses::OnBossDead")) end; or maybe OnBossDead2 , you have 2 labels in the script ,and i don't know what monster you mean.
  15. sader1992's post in Doppelganger mobcount was marked as the answer   
    invek,150,164,3 script MvP 527,{ mes "1. Doppelganger (gef_dun02) = "+( ( mobcount( "aev_fild01","MvP::OnKilledsilver") == 0) ? "^ff0000DEAD^000000" : "^008000ALIVE^000000" ) +""; close; OnInit: initnpctimer; stopnpctimer; monster "aev_fild01",0,0,"Doppelganger",1046,1,"MvP::OnKilledsilver"; end; OnKilledsilver: setnpctimer 0; startnpctimer; end; OnTimer1800000: announce "Doppel is now alive",0; monster "aev_fild01",0,0,"Doppelganger",1046,1,"MvP::OnKilledsilver"; stopnpctimer; end; }  
  16. sader1992's post in @ccommands was marked as the answer   
    @command it self shows the custom commands
    type @command
    see the last commands you will see "script commands"
    and than you will see all the commands made by scripts
    ofc you can do this too
    - script ccommand -1,{ OnAtcommand: dispbottom "@segurity - This command is used to protect your account and items."; dispbottom "@pvproom - This command is used to enter from anywhere in the pvp room."; dispbottom "more commands"; end; OnInit: bindatcmd "ccommand",strnpcinfo(3)+"::OnAtcommand"; end; }  
  17. sader1992's post in help with item scripting was marked as the answer   
    the item itself
    bAddEle -> bMagicAddEle
    the combo , look at
    bMdef,.@r*; << wrong
  18. sader1992's post in Quest errors? was marked as the answer   
    if you ate using 2018 clients , you should add the quest in OngoingQuestInfoList.lub file not questid2display.txt
  19. sader1992's post in Disabled was marked as the answer   
    to disable the "effect" , you need to delete it script
    to disable the "drop" you need to remove it from the monster database
    removing the item from item database is not valid thing to do , you will get a lot of errors > it will remove the items from the server but you get errors in exchange
  20. sader1992's post in Problem's with vendingmapscript was marked as the answer   
    your reply does not add the information we asked for ? , atall
    the code you put is 8cells and the image is 4cells ?
     
    anyway I can sense your problem from the image
    add this line after OnInit:
    setbattleflag "min_npc_vendchat_distance", 0;  
    also if you did read the error message you get in the chat and add it to the post from the start you would got faster answer
  21. sader1992's post in Help>group ID was marked as the answer   
    follow /doc/item_group.txt
  22. sader1992's post in switch system was marked as the answer   
    https://github.com/rathena/rathena/pull/3548
  23. sader1992's post in 1 hour cooldown on npcs... was marked as the answer   
    prontera,155,155,5 script Cornfarmer 4_CORN,{ if (BaseJob == Job_Gunslinger) { if (CORNCOOLDOWN > gettimetick(2)){ mes "you need to wait 1 hour to get one more corn"; close; } getitem 26001,1; CORNCOOLDOWN = gettimetick(2) + 3600; //3600 seconds! = 1 hour mes "you got a corn!"; close; }//gs only mes "corn only for gunslingers sorry"; close; }  
  24. sader1992's post in Obtain Points Only if Killed Player has a Variable was marked as the answer   
    set .@killedvar,getvar(EnableGod,getcharid(0,rid2name(killedrid))); if(.@killedvar == 1 && EnableGod == 1){ PvPkills++; dispbottom "You have won points."; dispbottom "God Point(s): "+PvPkills+"."; }  
  25. sader1992's post in Maximum number of skills per job was marked as the answer   
    pc.hpp
    #define MAX_SKILL_TREE 85
     
    also a fast way to do it
    create new group id
    give it all_skill: true permission
    add the group id to OnPCLoginEvent for the job id or at the job changer (or any kind of script)
    you will find all the skills in the etc window
×
×
  • Create New...