Jump to content

Garr

Members
  • Content Count

    482
  • Joined

  • Last visited

  • Days Won

    8

Reputation Activity

  1. Upvote
    Garr got a reaction from Ridley in Requesting a script for reading "true" skill point   
    Checking some more I found that skillpointcount() will basically show how many skill points you'd have if you resetted, aka without quest and 9 basic, BUT for novice it counts in basic skill.
     
    Also, each character seems to get a "jobchange_level" variable set on them when they change job, so it's possible to calculate how many points they should have.
    For 1st/high 1st class It'll be (JobLevel-1) skill points + 9 basic, but we'll throw them out if we'll compare to skillpointcount. For 2nd/trans job it'll be (JobLevel + jobchange_level - 2) total, +9 basic which we won't count again. I'm trying to make a script now, i'll edit it in in a bit.
     
     
    ETA: I didn't test it much, but seems to work.
     
    prontera,156,184,5  script  LostPointsRestore  100,{.@sk = skillpointcount();if (eaclass()&EAJL_THIRD) {.@sks = JobLevel + jobchange_level + jobchange_level_3rd - 3;} else {  if (eaclass()&EAJL_2) {    .@sks = jobchange_level + JobLevel - 2;  } else {    .@sks = JobLevel - 1;  }}if (.@sk < .@sks){  dispbottom "It seems something strange happened to your skill points. Here, let me replenish missing ones~";  SkillPoint = SkillPoint + (.@sks-.@sk);  dispbottom "There you go. Now everything should be all right. Have fun!";} else {  dispbottom "Everything is fine with your skill points! Take care~";}end;} It doesn't take away skill point, only grants missing ones.
     
    Further edit: But this only includes up to 2nd/trans jobs. I have yet to think a way to count in 3rd jobs "should have" skillpoints.
     
    Edit once more: It seems I am blind. There's "jobchange_level_3rd" variable on each player. How convenient. Edited script to support Novice, 1st, 2nd and 3rd jobs. Haven't tried with extended jobs, but might work as well.
  2. Upvote
    Garr got a reaction from Zirius in Disabled skills via map_zone_db.conf are still allowed to be used   
    I think the proper way for zone mapflag is just
    <map_name><%tab>mapflag<%tab>zone<%tab><zone_name> That "pvp" is excess in your call.
    You can check if your zone is applied on the map by teleporting to it and using @mapinfo, it'll list you all zones it's using. I'd guess this one should either show "PvP" or "PvP + PVP_no_calling".
  3. Upvote
    Garr got a reaction from AnnieRuru in [Outdated] battleground system without waitingroom   
    If I understood your code right problem should be here:
    for ( i = 0; bgd->members[i].sd; i++ ) mapreg->setreg( reference_uid( script->add_str("$@arenamembers"), i ), bgd->members[i].sd->bl.id ); As I understood it's supposed to add in members until there'll be no id in next member, the problem is:
    int bg_team_leave(struct map_session_data *sd, enum bg_team_leave_type flag) {... ARR_FIND(0, MAX_BG_MEMBERS, i, bgd->members[i].sd == sd); if( i < MAX_BG_MEMBERS ) { // Removes member from BG if( sd->bg_queue.arena ) { bg->queue_pc_cleanup(sd); pc->setpos(sd,bgd->members[i].source.map, bgd->members[i].source.x, bgd->members[i].source.y, CLR_OUTSIGHT); } memset(&bgd->members[i], 0, sizeof(bgd->members[0])); }...} The leaving member can have any index in array, including index 0, which will result in $@arenamembersnum staying 0.
     
    Oor I may be completely wrong since I never even learned C++ and playing with server code is my first attempt ever >.>
  4. Upvote
    Garr reacted to jTynne in RO SETA (Crush Dump Viewer)   
    File Name: RO SETA (Crush Dump Viewer)
    File Submitter: Eiphes
    File Submitted: 13 Jul 2014
    File Category: Client Resources
     
    File Name: RO Seta (Crash Dump Viewer)
    This tool was recently sent to me by a friend, that converts crash dumps/error handlers into readable content.
     
    For example, from one of my Support Tickets I'd received on my server, the following error handler was provided:
    0012F46C : 58 61 D9 20 50 B1 C2 2A 58 61 D9 20 73 70 72 690012F47C : 74 65 5C BE C7 BC BC BB E7 B8 AE 5C B3 B2 5C B30012F48C : B2 5F BF E4 C1 A4 C0 C7 B1 CD 2E 73 70 72 00 7F0012F49C : 80 F4 12 00 38 31 14 00 00 00 14 00 A4 45 76 730012F4AC : 90 F5 79 73 50 F5 AB 25 0D 44 76 73 C8 F4 12 000012F4BC : 00 00 00 00 B8 00 91 7C D8 3E A5 25 94 F5 12 000012F4CC : 41 00 91 7C E8 09 14 00 5D 00 91 7C 00 00 00 000012F4DC : 20 33 A5 25 E0 3E A5 25 A8 CE 90 25 00 00 00 000012F4EC : 0D 9A 80 7C 00 00 00 00 C8 B8 AE 25 00 00 00 400012F4FC : 00 00 00 00 10 F5 12 00 00 00 00 00 B8 00 91 7C0012F50C : F0 F4 12 00 DC F5 12 00 68 FA 12 00 D8 9A 83 7C0012F51C : 10 9A 80 7C FF FF FF FF 0D 9A 80 7C 44 0F 78 730012F52C : 70 3F A5 25 D0 F5 12 00 90 00 00 00 20 00 00 000012F53C : C8 B8 AE 25 A8 B9 AE 25 C8 B8 AE 25 EC F5 12 000012F54C : 2B 45 76 73 D0 F5 12 00 A8 B9 AE 25 00 00 00 000012F55C : 00 00 14 00 00 00 14 00 90 F5 79 73 08 B0 82 25
    And when entered into RO Seta, it converts to:
    XaÙ P±Â*XaÙ sprite¾Ã‡¼¼Â»Ã‡Â¸Â®³²³²_¿ääÀDZÃ.spr.‚¬Ã´.81...¤EvsÂõysPõ«%DvsÈô..¸.€˜|Ø>Â¥%€õA.€˜|È .].€˜|.. 3Â¥%À>Â¥%¨ÎÂ%..š‚¬|..ȸ®%..@..õ...¸.€˜|ðô.Üõ.hú.Øšƒ|š‚¬|ÿÿÿÿš‚¬|Dxsp?Â¥%ðõ.Â.. .ȸ®%¨¹Â®%ȸ®%ìõ+Evsðõ.¨¹Â®%......Âõys°€š%
    Specifically,
    sprite¾Ã‡¼¼Â»Ã‡Â¸Â®³²³²_¿ääÀDZÃ.spr
     
    Brings notice to the male version of Elven Ears.
     
    Some errors will remain garbled, but for the most part, this is an invaluable tool that allows server owners the ability to better pinpoint what's happening in their player's crash dumps.
     
    Credits to Skipper, though I have no idea where the file originally came from as again, it was literally sent to a short while ago.
     
    Click here to download this file
  5. Like
    Garr got a reaction from evilpuncker in NPC Syntax Highligh for Notepad++   
    If you want you can use mine, I use it with white BG, also converted all hercules commands/maps/constants not so long ago.
     
    https://www.mediafire.com/?651l534mjmdlec3
     
    (It doesn't let me attach xml files, so >.> )
     
    Example
  6. Upvote
    Garr got a reaction from jaBote in Help increasing damage to specific monster   
    I'd say create race2 for them? Like in Orc Lady card. But that needs a little editing of src.
     
    Add your chosen monsters to db/(pre-)re/mob_race2_db.txt.
     
    Add script to needed item: bonus2 bAddRace2,<Group number>(RC2_<GROUP NAME>),<Damage Bonus>;
     
    Open map.h and find:
    enum { RC2_NONE = 0,... RC2_MAX} And add your race2 name before RC2_MAX.
     
    Also add RC2_<GROUP NAME> <Group number> to db/const.txt
     
    I think that should do the trick.
  7. Upvote
    Garr got a reaction from eKoh in Check how many items free space & available weight in inventory   
    If I understand it right, it's for when you have an array with ItemIDs to give and another array with amounts, like this:
    setarray .itemIDs[0],512,7049,4001,985; // Apple, Stone, Poring Card, Eluniumsetarray .itemAmount[0],10,20,1,15;if ( checkweight2(.itemIDs,.itemAmount) ) {  for ( .@i = 0; .@i < getarraysize(.itemIDs); .@i++) {    getitem .itemIDs[.@i],.itemAmount[.@i];  }} else {  dispbottom "You don't have enough space in your inventory to get the items!";}end;
  8. Upvote
    Garr got a reaction from Zirius in Example of an NPC that checks if a player has already learned a skill?   
    You can find all the script functions in doc/script.commands.txt, variables are names of skills, you can see them in skill_db ( db/(pre-)re/skill_db.txt ).
     
    Also, there's quite a few of script-used variables set in db/const.txt. This is not the case, but for the future reference
  9. Upvote
    Garr got a reaction from Zirius in Check how many items free space & available weight in inventory   
    If I understand it right, it's for when you have an array with ItemIDs to give and another array with amounts, like this:
    setarray .itemIDs[0],512,7049,4001,985; // Apple, Stone, Poring Card, Eluniumsetarray .itemAmount[0],10,20,1,15;if ( checkweight2(.itemIDs,.itemAmount) ) {  for ( .@i = 0; .@i < getarraysize(.itemIDs); .@i++) {    getitem .itemIDs[.@i],.itemAmount[.@i];  }} else {  dispbottom "You don't have enough space in your inventory to get the items!";}end;
  10. Upvote
    Garr got a reaction from Zirius in [HELP] how to install @afk in linux VPS   
    Open Makefile.in in src/plugins/ and edit line
    MYPLUGINS = Write there name of plugin, in your case afk. If you'll have more just add them after space. You'll have this:
    MYPLUGINS = afk Now do ./configure && make all from Herc directory or, if you have server compiled already, do make plugins.
     
    Also, after that open conf/plugins.conf and add your plugin there.
    Since it's a command don't forget to add it to conf/groups.conf. If you want you can add aliases for this command in conf/atcommand.conf.
  11. Upvote
    Garr got a reaction from eKoh in I use a Function but OnSellItem does not work?   
    It'a kind of hard to tell why without seeing the script itself. Common problem is that you either misspelled NPC name or gave NPC a unique name, yet still try to call it via normal name.
     
    Example:
    function script TestCall {donpcevent "Tes::OnTrigger"; // <- Will errordonpcevent "Testing#01::OnTrigger"; // <- Will errordonpcevent "Test::OnTrigger"; // <- Should succeedreturn;}prontera,185,147,4 script Testing#01::Test 837,{mes "Hello!";callfunc "TestCall";close;OnTrigger:emotion e_sob;return;}  
    ETA: It doesn't work as in not found like this? Or it doesn't work in some other way? (because depending on how you call label it will either have RID attached or not, and OnSellItem should have RID attached.)
     
    *doevent "<NPC object name>::<event label>";This command will start a new execution thread in a specified NPC object at the specified label. The execution of the script running this command will not stop, and the event called by the 'doevent' command will not run until the invoking script has terminated. No parameters may be passed with a doevent call.The script of the NPC object invoked in this manner will run as if it's been invoked by the RID that was active in the script that issued a 'doevent'. As such, the command will not work if an RID is not attached.---------------------------------------*donpcevent "<NPC object name>::<event label>";This command invokes the event label code within an another NPC or NPCs. It starts a separate instance of execution, and the invoking NPC will resume execution its immediately.If the supplied event label has the form "NpcName::OnLabel", then only given NPC's event label will be invoked (much like 'goto' into another NPC). If the form is "::OnLabel" (NPC name omitted), the event code of all NPCs with given label will be invoked, one after another. In both cases the invoked script will run without an attached RID, whether or not the invoking script was attached to a player. The event label name is required to start with "On".This command can be used to make other NPCs act, as if they were responding to the invoking NPC's actions, such as using an emotion or talking.
  12. Upvote
    Garr got a reaction from eKoh in I use a Function but OnSellItem does not work?   
    About player not attached, I gave you info on doevent and donpcevent, donpcevent DOES NOT TRANSFER RID, while doevent DOES. About why you're getting NPC not found error is because the label you want to trigger is inside function. Functions are treated differently from NPC, and as far as I know you shouln't be able to trigger labels in them with do(npc)event. What might work, however, is summoning label without NPC name, like this:
    doevent "::OnTrigger"; I'll test that and tell you result.
     
    EDIT: Even that doesn't work. Only way you can trigger label in function is by goto inside function itself. Otherwise you can only call said function from the beginning with callfunc.
     
    As an alternative you can create another function with what's supposed to be under that label code, or add in an argument to function which will decide which label to trigger, and switch(getarg(0)), for example, at the start of function.
  13. Upvote
    Garr got a reaction from evilpuncker in Monster HP, From red bar to numbers. (Client?)   
    If all of them don't work, then maybe (just maybe), you're using showname format #1 in client? It looks like this on monster:

     
    On the other hand, that conf only works with showname style 2, it should look like this:

     
    So if you're having bold font on character and monster names type /showname, and it should change to thin font where additional info is shown.
  14. Upvote
    Garr got a reaction from eKoh in How can I detect every item I sell to this NPC?   
    Well, yours will only work for 3 items, this one should go for any amount:
    - shop dyn_shop1 -1,501:50- script Test -1,{ callshop "dyn_shop1",2; npcshopattach "dyn_shop1"; end;OnSellItem: for (.@i = 0; .@i < getarraysize(@sold_nameid); .@i++) { if (countitem(@sold_nameid[.@i]) < @sold_quantity[.@i] || @sold_quantity[.@i] <= 0) { mes "omgh4x!"; close; } else if (@sold_nameid[.@i] > 1){ setd ".@item" + .@i, @sold_nameid[.@i]; setd ".@itemqty" + .@i, @sold_quantity[.@i]; mes "You want " + getd(".@itemqty" + .@i) + " " + getitemname(getd(".@item" + .@i)) + (getd(".@itemqty" + .@i)>1?"s":"") + ", right?"; } } mes "That totals " + getarraysize(@sold_nameid) + " items."; deletearray @sold_quantity, getarraysize(@sold_quantity); deletearray @sold_nameid, getarraysize(@sold_nameid); close;}prontera,154,182,5 duplicate(Test) Test#1 117
    An it's strange, for me arrays with char variables went fine.
  15. Upvote
    Garr got a reaction from zackpinoy in private mvp please help   
    Strange, that's only one of 2 places where killmonsterall is applied, other being renting the room. Are you sure you ran @reloadscript or restarted server after making the change to the script and saving it?
  16. Upvote
    Garr got a reaction from stiflerxx in problems Event   
    I didn't really understood what you wanted, but here goes:
     
    setcell "eden_dun03",86,220,86,216,cell_walkable,0;announce "[ Dungeo Guild ]: E as Barricadas Apareceram vão destrui-las !!!",8; goto OndsBarri; }end;//BarricadasOndsBarri:set $mobs,5;monster "eden_dun03",87,220,"Barricadas da DG",1905,1,"DS3::OndsBdead";monster "eden_dun03",87,219,"Barricadas da DG",1905,1,"DS3::OndsBdead";monster "eden_dun03",87,218,"Barricadas da DG",1905,1,"DS3::OndsBdead";monster "eden_dun03",87,217,"Barricadas da DG",1905,1,"DS3::OndsBdead";monster "eden_dun03",87,216,"Barricadas da DG",1905,1,"DS3::OndsBdead";end;OndsBdead:set $mobs,$mobs-1;if($mobs == 0){ announce "[ Dungeo Guild ]: As Barridacas foram Destruidas!!",8; }if($mobs == 0){ announce "[ Dungeo Guild ]: E os Baús Apareceram vão destrui-los !!!",8; goto Ondsbox; }end;//BausOndsbox:set $mobs,8;areamonster "eden_dun03",32,200,50,195,"Baú Perdido",2855,4,"DS3::Ondsboxdead";areamonster "eden_dun03",60,190,20,200,"Baú Perdido",2855,4,"DS3::Ondsboxdead";setcell "eden_dun03",86,220,86,216,cell_walkable,1;end;Ondsboxdead:set $mobs,$mobs-1;if($mobs == 0){ announce "[ Dungeo Guild ]: A última Caixa do Tesouro foi destruída!",8;announce "[ Dungeo Guild ]: Obrigado a todos que participaram.",8;disablenpc "[DG]Entrada Dungeo Guild";disablenpc "Entrada Dungeo";disablenpc "darkmall1";sleep2 7000;mapwarp "eden_dun03","prontera",150,150; You missed an end; after OndsBdead: label, so after first kill it went straight to Ondsbox: label.
     
    Also, in your Ondsbox: label amount of monsters does not correspond with $mobs variable, so I made each areamonster spawn 4 monsters. You can change it back to 1 and set $mobs to 2 instead, depending on what you want.
×
×
  • Create New...

Important Information

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