Jump to content

Ninja

Members
  • Posts

    513
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by Ninja

  1. Okay. Thanks for the input. I decided to give it a try and figured out that it is indeed int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Damage *d,int64 damage,uint16 skill_id,uint16 skill_lv) It's actually the final damage calculation of everything (yes, from normal attacks to skills.)
  2. if you can actually check out what I posted, int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Damage *d,int64 damage,uint16 skill_id,uint16 skill_lv) I'm just not sure if it can take "0" as skill_id for normal attacks.
  3. Yes, I do understand that it can be found in battle.c, I'm looking for the specific function though. Thank you
  4. Hi rA, I'm a big newb in source modification, I'm trying to implement a new mapflag called "instakill." as the name suggests, if the mapflag is turned on, 1 normal attack would output maximum damage to the target. I've already figured out how to create my own mapflag, the only thing left to do is the damage modification that this mapflag would inflict. I was looking at int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Damage *d,int64 damage,uint16 skill_id,uint16 skill_lv) but I'm not sure if it is the right one. Can someone please point me to the right direction? Thanks in advance.
  5. If I may suggest, you can have more than 1 approach here but I'd have 2 for you 1. Separate each monster script's OnDummyKill. (i.e. comodo -> OnDummyKillComodo, etc.) 2. Use OnNPCKillEvent and do a map check there.
  6. Yes, because we are saying different points. @Secrets is saying that it can be a security issue for your server if someone knows how to do SQL injection. I was simply checking things that I was not aware of about your server. On her second point she is suggesting that you check if the player is online or not, if he is online you should delete directly the items in his inventory through delitem2, if not, proceed with SQL Delete query. Her second point also invalidates my point regarding "you will not be able to delete items of players that are online because items get saved when players logout."
  7. For the last 2 items. I suggest you open an issue in the github repo so that it will be investigated and fixed. https://github.com/rathena/rathena/issues/new
  8. Well, before I do anything with your script, You should be aware that first of all, you will not be able to delete items of players that are online because items get saved when players logout. Second, you may make sure that you are using the right group id in your script. I guess setting it to < 99 Will be a better choice. Then try it again and let us know the results.
  9. input .@i $; if (strtolower (.@i $ ) == "yes") { do this; }
  10. Please open a new issue in the github page: https://github.com/rathena/rathena/issues/new so this will be investigated
  11. So it's something like, A player becomes a zombie, he kills someone and that someone becomes a zombie. Interesting.
  12. You only need to learn how to use SQL and in my opinion it is fairly easy.
  13. I think it is. Just a combination of logics between OnPCLoadMapEvent, OnPCStatCalcEvent and Strcharinfo. Or if you're into it, manually do it via database onequip script. //edit You can also create a mapflag and a new script event like OnPCEquipEvent via source modding
  14. @bdgro unless you provide more info about what this script is about, as much as we would like to help, we can't because we don't exactly know what you're looking for and what it does.
  15. I think all activities about items can be seen in itemlog sql table. You don't need to do something like this. Have checked it?
  16. Yes. For more info. Please look at some SQL basics cheatsheet. https://www.w3schools.com/sql/
  17. He means that you will be using item_db_pre instead of item_db_re and that you have to think about how to modify the sql command that I gave you to also update item refines which are located in other tables such as storage, cart_inventory, etc.
  18. UPDATE inventory INNER JOIN item_db_re ON inventory.nameid = item_db_re.id SET inventory.refine={CHANGE THIS VALUE TO DESIRED REFINE} WHERE item_db_re.type IN ({PUT ALL ITEM TYPES SEPARATED BY COMMAS}); https://github.com/rathena/rathena/wiki/Custom_Items refer to the link on item types. this method will only work if the person who owns the item is offline.
  19. I'm not really sure what's wrong with yours but it works on mine. I used @Emistry's script as I missed the OnInit part.
  20. Yes, one idea is to create the "party registration" in such a way that it takes note of the party name instead of the names of the people who registered then create an instance assign it to 1 party then just party warp all the other remaining ones.
  21. it would help if you can provide us with in-game screenshots especially your inventory.
  22. NPC#1 prontera,157,171,4 script Tratoa 489,{ if (quest_tratoa == 1) { mes "Que bueno terminaste la quest"; mes "Yo tambien puedo enviarte a Tradoa"; close; } mes "Esta es la ques que te llevara al mitico mapa Tratoa"; next; mes "Tratoa esta alado de la carcel de mosntruos llamado Las Tinieblas"; next; mes "Los mosntruos escaparon de las Tienieblas"; mes "Por lo cual constantemente mosntrus deviles y poderosos entran a tratoa diariamente"; next; mes "Una ves completada esta Quest tendras acseso a Tratoa"; next; mes "Primero que nada deves ablar con siertas personas dispersadas por todo Rune Midgar"; next; mes "Al final de todo deveras ablar con Gonsalo esta alado mio... quien es el que te enviara a Tratoa y con el deveras ablar para poder ir siempre a tratoa"; next; mes "Ahora ve y abla con Stefan que esta en izlude"; set quest_tratoa, 1; close; } NPC#2 nif_fild01,273,245,5 script Skull Trader 910,{ mes "[ Skull Girl ]"; if (quest_tratoa == 1) { mes "Hola soy el creador de las bloody branch"; mes "no le digas a nadie"; mes "Para hacer las bloody branch necesito lo siguiete"; next; mes " "+.skull_required+" "+getitemname(.skull_id)+""; mes " "+.skulla_required+" "+getitemname(.skulla_id)+""; mes " "+.skulls_required+" "+getitemname(.skulls_id)+""; mes .exchange_qty+"x "+getitemname(.exchange_id); mes "How many ^FF0000Bloody Branch^000000 do you want to exchange?"; input .@input; if(!.@input){ next; mes "[ Skull Girl ]"; mes "Come back again~"; close; } //check if player has the needed amount of items if(((.@input * .skull_required) < countitem(.skull_id)) || ((.@input * .skulla_required) < countitem(.skulla_id)) || ((.@input * .skulls_required) < countitem(.skulls_id))){ next; mes "[ Skull Girl ]"; mes "You don't have enough skulls to exchange that many."; close; } next; delitem .skull_id,.skull_required * .@input; delitem .skulla_id,.skulla_required * .@input; delitem .skulls_id,.skulls_required * .@input; getitem .exchange_id,.exchange_qty * .@input; mes "[ Skull Girl ]"; mes "Oh em geeee"; mes "Yasss I hassss "+getitemname(.skull_id)+" "+getitemname(.skulla_id)+" "+getitemname(.skulls_id)+" nowwww!"; mes "Me so happy, here take these "+getitemname(.exchange_id)+"!"; close; } OnInit: set.skull_required,20; //number of skulls set.skulla_required,20; //number of skulls set.skulls_required,20; //number of skulls set.skull_id,604; //id # of skull set.skulla_id,7203; //id # of skull set.skulls_id,7347; //id # of skull set.exchange_qty,1; //number of exchanged items set.exchange_id,12103; //id # of exchanged item end; } Your script put an NPC inside another NPC which is a bad practice. Also, your checking script was a nested if statement and it would be bypassed if someone has the correct amount of 1 type of skull. Please try the scripts above
  23. Interesting. I think even without using any source you can get this working but it'll be great if we can have a function that can manage a group of parties.
  24. https://github.com/rathena/rathena/wiki
  25. what I did to fix my compilation problem was to install the full gcc package. Hence, yum install -y gcc*
×
×
  • Create New...