Jump to content

Capuche

Developer
  • Posts

    2407
  • Joined

  • Last visited

  • Days Won

    52

Everything posted by Capuche

  1. For NPCs you can also use *npctalk "<message>"{,"<NPC name>"}; https://github.com/rathena/rathena/blob/master/doc/script_commands.txt#L6108 izlude,75,100,3 script npc 1 4_DR_SOLDIER,{ unittalk getnpcid(0,"npc 2"), "NPC 2 is talking"; end; } izlude,72,100,3 script npc 2 4_DR_SOLDIER,{ npctalk "npc 1 is talking", "npc 1"; end; }
  2. Thanks for the digest @nanakiwurtz
  3. unitexist on idAthena = unitexists on rAthena. Take the one on our PR if you don't want to be bothered by script conversion. https://github.com/rathena/rathena/pull/1889
  4. setarray .@item_to_remove[0], 2321, 2403; .@size_item_to_remove = getarraysize( .@item_to_remove ); for ( .@i = 0; .@i < .@size_item_to_remove; .@i++ ) { .@count = countitem( .@item_to_remove[.@i] ); .@total_item += .@count; delitem .@item_to_remove[.@i], .@count; } getitem 501, .@total_item; What do you mean?
  5. I'm already following the news on your blog @Secrets added some infos about hugel monster race in https://github.com/rathena/rathena/issues/1895
  6. I like the UI smelting update <3 Mechanic job update ? Anyway thanks for the infos @Ziu
  7. Please read the docs ! setunitdata will remove the previous mode and set your mode. Sometimes you need to keep the original mode. It will work.
  8. We didn't push the mode to constant yet. Don't forget to retrieve the original mode of your mob and add it. A sample : monster "prontera",0,0,"Quest Poring",1002,1; .@mob_unique_id = $@mobid[0]; getunitdata .@mob_unique_id, .@data; setunitdata .@mob_unique_id, UMOB_MODE, ( .@data[UMOB_MODE] | 0x0000004 );
  9. Did you update your branch ? https://github.com/rathena/rathena/pull/1825/commits/d2f8852a56f6e2510b9cd0b5f9afac36ec6c6063
  10. Use *setd "<variable name>",<value>{,<char_id>}; *getd("<variable name>") for N-dimensional array
  11. Hmm interesting. Are you planning to script the wave mode sky later ?
  12. *monster "<map name>",<x>,<y>,"<name to show>",<mob id>,<amount>{,"<event label>",<size>,<ai>}; *areamonster "<map name>",<x1>,<y1>,<x2>,<y2>,"<name to show>",<mob id>,<amount>{,"<event label>",<size>,<ai>}; ... Returned value is an array with the game ID of the spawned monster(s) depending on the amount spawned. Array is stored in $@mobid[]. What does that mean ? For example your synthax is wrong in 'TNM_TRAP = monster(instance_mapname("1@tnm3"),1,1,"",2960,1); setunitdata 'TNM_TRAP, 29, 1; You need to replace it by monster(instance_mapname("1@tnm3"),1,1,"",2960,1); 'TNM_TRAP = $@mobid[0]; setunitdata 'TNM_TRAP, 29, 1;
  13. https://github.com/rathena/rathena/blob/master/npc/custom/jobmaster.txt#L300
  14. Header : //= NOTE: Requires SQL mob database.
  15. 1/ if (.@card2 == 0) {// <-- condition == 1 => script continue (re-enchant) if (.@max == 1) {// <-- max is always == 0 in your script mes "[Hugin's Magic Master]"; //Custom text mes "Your shoes have reached the maximum option to enchant."; mes "Please bring me a new one if you want me to enchant again."; close; } else { 2/ set .@enchant,.@enchant4th[5];// .@enchant4th[5] unset in your Hugin's Craftsman NPC @@ -110,8 +110,7 @@ glast_01,212,273,4 script Hugin's Magic Master 66, .@card3 == .@enchant4th[3] || .@card3 == .@enchant4th[4] || .@card3 == .@enchant4th[5]) { set .@card2,getequipcardid(.@part,2); set .@cost,.@enchant_cost[4]; - if (.@card2 == 0) { - if (.@max == 1) { + if (.@card2 > 0) { mes "[Hugin's Magic Master]"; //Custom text mes "Your shoes have reached the maximum option to enchant."; mes "Please bring me a new one if you want me to enchant again."; @@ -118,7 +117,7 @@ glast_01,212,273,4 script Hugin's Magic Master 66, close; } else { //3rd slot random enchanting - switch (.@card3) { + switch (.@card3) { case 4822: //Fighting_Spirit7 case 4835: //Expert_Archer4 case 4826: //Spell5 @@ -125,7 +124,6 @@ glast_01,212,273,4 script Hugin's Magic Master 66, case 4862: //MHP2 case 4881: //DelayafterAttack4Lv case 4755: //Luck6 - set .@max,1; set .@enchant,callfunc("F_Rand",4875,4876,4877,4878,4879,4880); //Bear's_Power,Runaway_Magic,Speed_Of_Light,Muscle_Fool,Hawkeye,Lucky_Day mes "[Hugin's Magic Master]"; //Custom text mes "Seems you already completed the best upgrade option in your 4th slot."; @@ -154,11 +152,13 @@ glast_01,212,273,4 script Hugin's Magic Master 66, mes "Thank you for believing in me."; getitem2 .@equip_id,1,1,.@equip_refine,0,0,0,.@enchant,.@card3; close; - } } } - } + else { + mes "An unknown error has occurred."; + close; + } //4th slot 2nd try enchanting if (.@card3 == .@enchant1st[0]) set .@enchant,.@enchant2nd[0]; @@ -289,7 +289,7 @@ glast_01,210,270,8 script Hugin's Craftsman 726,{ mes "You must bring ^0000FF5 Temporal Crystal items^000000. Nothing is free you know..."; close; } - set .@random,rand(100,100); + set .@random,rand(100); if (.@random <= 80) { //Custom rates mes "[Hugin's Craftsman]"; mes "Arrggg, we failed. Better luck next time."; @@ -301,10 +301,10 @@ glast_01,210,270,8 script Hugin's Craftsman 726,{ // Magic Copy - set .@part,EQI_SHOES; - set .@equip_refine,getequiprefinerycnt(.@part); - set .@enchant,.@enchant4th[5]; - set .@card3,getequipcardid(.@part,3); + set .@part,EQI_SHOES; + set .@equip_refine,getequiprefinerycnt(.@part); + set .@enchant,getequipcardid(.@part,2); + set .@card3,getequipcardid(.@part,3); mes "[Hugin's Craftsman]"; //Custom text
  16. Typo : isbeginquest must be isbegin_quest
  17. Easy to read. Well done ! Note: rathena doesn't like to add string until fd482381f62fccd06460c204aa32a5325542bed2 if I remember. Also why did you used close2 at the end of the file ? mes "All of your records for this quest have been deleted."; close2;
  18. Hmm we need to make a sample.
  19. What about setunitdata <GID>,UMOB_DMGIMMUNE,1;
  20. Did you added the event under if( md->npc_event[0] && !md->state.npc_killmonster ) { (mobs with event attached) ?
  21. Check the docs for startnpctimer
  22. No crash and I got the same game ID in all cases. Your version is up to date ?
  23. Perhaps you spawn several monsters ? Check your $@mobid array. It should be pc_setglobalreg(mvp_sd, add_str("killedgid"), md->bl.id);
  24. md->bl.id to retrieve the game id of the killed monster.
×
×
  • Create New...