-
Posts
1678 -
Joined
-
Last visited
-
Days Won
71
Content Type
Profiles
Forums
Downloads
Jobs Available
Server Database
Third-Party Services
Top Guides
Store
Crowdfunding
Posts posted by sader1992
-
-
+(gettimetick(1)/60)-RandomQuestTime+
to
+((gettimetick(1)/60)-RandomQuestTime)+
- 1
-
-
6 hours ago, BlazingSpear said:
when i apply this code i got error
right you have an old emulator
ok follow this "in order"
https://github.com/rathena/rathena/commit/151c8476afb3adf7901bf2efc66086edc25a0d79
https://github.com/rathena/rathena/commit/500cfdc41fd64a9e5d84c6479c072cc56003854e
https://github.com/rathena/rathena/commit/9cba66c22eed86a95c24a3066404ac9fa037520c
you can just apply the inarray without the countinarray
-
1 hour ago, Charelle said:
Reporting back, the sprite is the same as what I did in my earlier attempt, it's static and only shows from the front angle. If I rotate my camera, or change position (side facing for example), the sprite disappears.
Below a screenshot of the only angle I can see the non-animated sprite:
Any other suggestions?
if this not the result that you have seen in the official server , then the files have a problem/not correct
or the sprite is intended to be empty (so you don't see it when you wear it) however it give a effect something like how Costume Dancing Fallen Sakura (Item ID# 20285) works
-
-
try this
- 1
-
9 hours ago, Charelle said:
Hello! I used the sprites directly extracted from TaiwanRO's GRF, also in exactly the same directory. Something seems off about it though if I compare it to the other cons_of_(element) sprites, an animation seems missing, and it has the headgear of Scaraba in one of them. Maybe I'm trying to implement something that's simply not working as intended officially?
If anyone wants to test, here are the sprites:
the equip sprite is not correct for male and female.
-
I feel like you messed up the lue files in the grf , make sure you have only one file where everything is correctly read
-
23 hours ago, Eross said:
Thankyou for your time guys ! Ilove you all .. I will try this later when I got home
Hi sader! I tried the script but no monster has spawned .Also, how to spawn a monster that has spawn timer ? Like example in gld_dun01 there is an Eddga that respawn on certain time .. How to make it not respawn automatically after killing instead it will respawn afteer certain minutes
create a timer , something like this
OnInstanceInit://Runs once the instance is created. 'map_gld_dun01$ = instance_mapname("gld_dun01");//save this map name inside the instance 'npc_instance_main_body$ = instance_npcname(strnpcinfo(3));//save this npc name inside the instance monster('map_gld_dun01$,32,36,"--en--",1002,1,'npc_instance_main_body$ + "::OnPoringKilled"); initnpctimer('npc_instance_main_body$); stopnpctimer('npc_instance_main_body$); end; OnPoringKilled: startnpctimer('npc_instance_main_body$); end; OnTimer600000://after 10 minute monster('map_gld_dun01$,32,36,"--en--",1002,1,'npc_instance_main_body$ + "::OnPoringKilled"); setnpctimer(0,'npc_instance_main_body$); stopnpctimer('npc_instance_main_body$); end;
or maybe put a sleep delay
OnInstanceInit://Runs once the instance is created. 'map_gld_dun01$ = instance_mapname("gld_dun01");//save this map name inside the instance 'npc_instance_main_body$ = instance_npcname(strnpcinfo(3));//save this npc name inside the instance monster('map_gld_dun01$,32,36,"--en--",1002,1,'npc_instance_main_body$ + "::OnPoringKilled"); end; OnPoringKilled: detachrid;//de attach the player from the event. sleep(600000);//sleep for 10 minutes monster('map_gld_dun01$,32,36,"--en--",1002,1,'npc_instance_main_body$ + "::OnPoringKilled"); end;
- 1
-
OnInit: bindatcmd "reset_count",strnpcinfo(3) + "::OnAtcommand"; end; OnAtcommand: mes "Reset Count: " + RESET_COUNT; end;
-
close2 doesn't detach the player , use close or end
for the reset times , you are already saving that in RESET_COUNT
so you can do something like
mes "Reset Count: " + RESET_COUNT;
- 1
-
6 hours ago, Eross said:
Good day sir @Emistry . I tried this one for my guild dungeon .. Im planning to make it instance like dungeon .. I've managed to create and enter the dungeon but the weird part is theres no monster inside ..
Also Destroy Instance is not working
- Id: 22 Name: Guild Dungeon TimeLimit: 7200 Enter: Map: gld_dun01 X: 32 Y: 36 AdditionalMaps: gld_dun02: true gld_dun03: true gld_dun04: true
//prontera,155,181,5 script Sample 757,{ brasilis,169,245,3 script Test 860,{ .@instance_name$ = "Guild Dungeon"; if (!is_party_leader()) end; switch(select( "Create", "Enter", "Destroy" )) { case 1: instance_create(.@instance_name$, IM_PARTY); break; case 2: switch(instance_enter(.@instance_name$)) { case IE_NOMEMBER: mes "ERROR: Party not found."; break; case IE_NOINSTANCE: mes "ERROR: Party does not have an instance."; break; case IE_OTHER: mes "ERROR: Unknown error."; break; default: break; } break; case 3: instance_destroy; break; } close; }
You need to create the instance body in a new npc with the instance map
you can check the instances commands in
and instances events in
so for example you want to spawn 1 poring when the instance starts and respawn it again everytime id die would be like
gld_dun01,0,0,0 script #instance_main_body 444,{ end; OnInstanceInit://Runs once the instance is created. 'instance_id = instance_id();//save the instance id 'map_gld_dun01$ = instance_mapname("gld_dun01");//save this map name inside the instance 'npc_instance_main_body$ = instance_npcname(strnpcinfo(3));//save this npc name inside the instance //^ 'var is instance variable , you can call it from any script in that instance. //spawn the monster with a death event monster('map_gld_dun01$,32,36,"--en--",1002,1,'npc_instance_main_body$ + "::OnPoringKilled"); end; OnPoringKilled: //announce that the poring is killed inside all the instance's maps instance_announce('instance_id,"The poring is killed!",0); //spawn the monster again after it's dead. monster('map_gld_dun01$,32,36,"--en--",1002,1,'npc_instance_main_body$ + "::OnPoringKilled"); end; }
and to destroy the instance from outside you need to provide the instance id
this should work
change
instance_destroy;
to
instance_destroy(instance_id(IM_PARTY));
^this will destroy the party instance that hooked to the player (it's not a good idea to do that without a lot of other checks like party leader , or the instance is the instance you want to destroy not another instance etc)
- 1
-
-
11 hours ago, Tdi123 said:
Did not work
did you run the web service?
-
1 hour ago, Eross said:
what about the other token ? does it work ? or everything doesn't work ?
and try @resurrect command while the character is dead , this command is the same as pushing the revive button.
I think this might be from the client diff.
-
they should work by default , any item inside the group IG_TOKEN_OF_SIEGFRIED
you can find this group in db folder in the item_misc.txt file depending on your server mode re or pre-re folder
after the yml update it's in here
pre-re
or
re
-
You are sure that the
.ladder_statues[.@i +1]
is the npc id ?
and
.@sex$[.@i]
is M or F of the player ?
the code above is correct however m = 1 not 0 and f = 0
use this
setunitdata(.ladder_statues[.@i+1],UNPC_SEX,((.@sex$[.@i] == "M")?1:0));
if your rAthena is too old (years old), make sure long ago the F or M was on the account not character, in that case you can take the gender from the login table, however I think the line above will fix the issue you are having.
you can use
debugmes(.@sex$[.@i]);
to see if the variable is valid (make sure it's F or M)
-
the only thing that I can suspect of
is SC_ Something is a bad way to call a function or a label or a npc
maybe try to rename the labels and functions ? specifically "SC_MOVEARM" "SC_ARMS" "SC_DISPARM"
because I didn't check but maybe the server is translating it to a SC_ variables like SC_STUN and other variables
to make it more readable I suggest to name the functions F_WhatEverYouWant , and labels as an event like OnWhatEverYouWant , NPCs rename them to WhatEverYouWant just don't use a prefix of a variables at the start
not sure if this would fix the problem, but I don't see any problem in the script code from the error you are getting , this is my only conclusion.
-
Are you sure that the errors you provided is from the script you provided ? not an edited version ?
-
7 hours ago, Rynbef said:
@sader1992I know which variable type I'm using but u misslrading me much.
did I mislead you by giving you the link for the official documents?
or telling you that you are using the incorrect variable types and it will lead to bugs in the script ?
or by the example that I included with the correct variable usage ?
well , there still a problem in the script that I mentioned before , maybe it's your chance to reach version 99 in your script.
- 1
-
1 hour ago, Rynbef said:
@wornTry this. The debug should now prompt on Ingame chat.
getItemByMapFunction v10 - Experimentell - Extended Debugging.txt 5.43 kB · 1 download
Rynbef~
again you need to know why you are using a type of variable , you don't have to stick to one variable type , you should use what the script needs, check my old reply for more info
looking at your script you should use .var + .@var + $@var
and there is no "debuglog" command
and "serarray" is misspelled
you should not use oninit or npc variables in a function
here I just fixed all the above without editing the script
getItemByMapFunction v10 - Experimentell - Extended Debugging.txt
-
1 hour ago, Rynbef said:
@sader1992I think u means to change to scope variables. Next time I bet u to tell me what u mean.
/* rAthena Script Author: @Rynbef Create Date: 2021-19-12 Last Updated: 2022-01-01 Changelogs: 2022-01-01: *changed OnNPCLoadEvent to OnNPCKillEvent *added check if killed enemie is player *removed space on callfunc after OnNPCKillEvent *fixed if statement syntax error *fixed if statement getarraysize of integer to getarraysize of specified getarg *removed callfunc OnInit *added console debugging can be disabled or enabled *changed variable types *fixed cant get item cause of wrong if statement *fixed for loop used array size instead random chance from argument getarg(3) *fixed player can't get item if random chance was equals to specified item chance *added argument amount to debug message *added map notification if player get lucky but not on a listed map. This can disabled or enabled seperat at OnInit below. Debugging needs to be enabled *added notification if everything works fine. Can be disabled or enabled on bottom of OnInit. Debugging needs to disabled #fixed wrong array output in for loop from getarg(0)[.i] to getelementofarray(getarg(0),.i) #changed .retval and .i vsriables to scope variables .@retval and .@i Feature planned: #Player get zeny if he get lucky #Player get zeny only if items disabled #Player get zeny or item if both enabled Description: Give a specified item getarg(1) of amount getarg(2) on specified map getarg(0) with a percentage of getarg(3) (0.1 to 100 percent) to a player IMPORTANT: All arrays needs to have the same sizes It's importent to set all 3 arguments to callfunc Terms: Dont name this as yours Dont sell this script Dont upload this script on download-/s section or share it otherwise for pay Modifications are included from this terms Otherwise feel free to edit Other: Don't hestiate to contact me at the forum as pm if u've any error,question,suggestion or want a modification Script: */ - script GetItemByMap -1,{ OnNPCKillEvent: if(killedrid >= 150000) end; set .@retval,callfunc("F_GetItemByMap",$@maps$,$@items,$@item_amounts); if(!$@debug) end; if(.@retval == 1) debugmes "[F_GetItemByMap]: Works fine! Player get item."; else if(.@retval == 2) debugmes "[F_GetItemByMap]: Works fine! Player is unlucky and get no item."; else if(.@retval == 3 && $@debugmap) debugmes "[F_GetItemByMap]: Player isn't on a listed map. Current map: "+strcharinfo(3); else if(.@retval == 4 && $@debugworking) debugmes "[F_GetItemByMap]: Everything works fine!"; else debugmes "[F_GetItemByMap]: Causes in errors. Debug logs on top!"; end; OnInit: setarray $@maps$[0],"prontera","alberta","izlude"; serarray $@items[0],501,4012,512; setarray $@item_amounts[0],100,1,5; setarray $@item_chance[0],1000,500,800;//Chance begins by 0.1 percentage. 1 = 0.1 and 1000 = 100 percent set $@debug,1;//0 = disable debugging,1 = enable set $@debugmap,1;//0 = disable map notification,1 = enable set $@debugworking,1;//0 = disable notification if everything works fine,1 = enable end; } function script F_GetItemByMap { if(!getarg(0) || !getarg(1) || !getarg(2) || !getarg(3) || getarraysize(getarg(0)) != getarraysize(getarg(1)) || getarraysize(getarg(0)) != getarraysize(getarg(2)) || getarraysize(getarg(0)) != getarraysize(getarg(3))){ if($@debug){ debugmes "[F_GetItemByMap]: An error is occurupted"; debugmes "[Function arguments]: Function arguments are empty or to short. Arguments: "+getargcount(); debugmes "[Array sizes]: Maps:"+getarraysize(getarg(0))+" - Items:"+getarraysize(getarg(1))+" - Amounts:"+getarraysize(getarg(2))+" - Chances:"+getarraysize(getarg(3)); debugmes "[Function arguments]: Maps:"+getarg(0)+" - Items:"+getarg(1)+" - Amounts:"+getarg(2)+" - Chances:"+getarg(3); } return 0; } else { for(.@i = 0; .@i<getarraysize(getarg(0)); .@i++){ if(rand(1,1000) < getelementofarray(getarg(3),.@i)) return 2; if(strcharinfo(3) == getelementofarray(getarg(0),.@i)){ getitem getelementofarray(getarg(1),.@i),getelementofarray(getarg(2),.@i); return 1; } else if($@debugmap){ return 3; } } } return 4; }
Download is attached bellow
getItemByMapFunction v4.txt 4.33 kB · 1 download
Rynbef~
what I meant is the other variables too, if the variable is only used inside the npc , you should use npc variable , also you might get problems when editing the npc and reload only that npc because $@ is global
the function will return if any of the chances failed , (setarray $@item_chance[0],1,1,1000;) [try getting the 3rd item from the 3rd map with this chance]
also there is no need for the function if it will only be called once.
with other mistakes in the script ,you can check it if you test the script (I rarely test my scripts when replying to a post , so that's understandable xD)
the debug messages are too much but that's my opinion
with optimization this is the result
- script GetItemByMap -1,{ OnNPCKillEvent: if((.@n = inarray(.maps$,strcharinfo(3))) == -1) end; if(rand(1000) <= .item_chance[.@n]) getitem(.items[.@n],.item_amounts[.@n]); end; OnInit: setarray .maps$[0],"prontera","alberta","izlude"; setarray .items[0],501,4012,512; setarray .item_amounts[0],100,1,5; setarray .item_chance[0],1000,500,800;//Chance begins by 0.1 percentage. 1 = 0.1 and 1000 = 100 percent end; }
this optimized script doesn't support inputting the same map twice , you can edit it to do so if you want that
-
27 minutes ago, Rynbef said:
@wornThis should fix the error.
/* rAthena Script Author: @Rynbef Create Date: 2021-19-12 Last Updated: 2022-01-01 Changelogs: 2022-01-01: *changed OnNPCLoadEvent to OnNPCKillEvent *added check if killed enemie is player *removed space on callfunc after OnNPCKillEvent *fixed if statement syntax error *fixed if statement getarraysize of integer to getarraysize of specified getarg *removed callfunc OnInit *added console debugging can be disabled or enabled *changed variable types *fixed cant get item cause of wrong if statement *fixed for loop used array size instead random chance from argument getarg(3) *fixed player can't get item if random chance was equals to specified item chance *added argument amount to debug message *added map notification if player get lucky but not on a listed map. This can disabled or enabled seperat at OnInit below. Debugging needs to be enabled *added notification if everything works fine. Can be disabled or enabled on bottom of OnInit. Debugging needs to disabled Feature planned: #Player get zeny if he get lucky #Player get zeny only if items disabled #Player get zeny or item if both enabled Description: Give a specified item getarg(1) of amount getarg(2) on specified map getarg(0) with a percentage of getarg(3) (0.1 to 100 percent) to a player IMPORTANT: All arrays needs to have the same sizes It's importent to set all 3 arguments to callfunc Terms: Dont name this as yours Dont sell this script Dont upload this script on download-/s section or share it otherwise for pay Modifications are included from this terms Otherwise feel free to edit Other: Don't hestiate to contact me at the forum as pm if u've any error,question,suggestion or want a modification Script: */ - script GetItemByMap -1,{ OnNPCKillEvent: if(killedrid >= 150000) end; set .retval,callfunc("F_GetItemByMap",$@maps$,$@items,$@item_amounts); if(!$@debug) end; if(.retval == 1) debugmes "[F_GetItemByMap]: Works fine! Player get item."; else if(.retval == 2) debugmes "[F_GetItemByMap]: Works fine! Player is unlucky and get no item."; else if(.retval == 3 && $@debugmap) debugmes "[F_GetItemByMap]: Player isn't on a listed map. Current map: "+strcharinfo(3); else if(.retval == 4 && $@debugworking) debugmes "[F_GetItemByMap]: Everything works fine!"; else debugmes "[F_GetItemByMap]: Causes in errors. Debug logs on top!"; end; OnInit: setarray $@maps$[0],"prontera","alberta","izlude"; serarray $@items[0],501,4012,512; setarray $@item_amounts[0],100,1,5; setarray $@item_chance[0],1000,500,800;//Chance begins by 0.1 percentage. 1 = 0.1 and 1000 = 100 percent set $@debug,1;//0 = disable debugging,1 = enable set $@debugmap,1;//0 = disable map notification,1 = enable set $@debugworking,1;//0 = disable notification if everything works fine,1 = enable end; } function script F_GetItemByMap { if(!getarg(0) || !getarg(1) || !getarg(2) || !getarg(3) || getarraysize(getarg(0)) != getarraysize(getarg(1)) || getarraysize(getarg(0)) != getarraysize(getarg(2)) || getarraysize(getarg(0)) != getarraysize(getarg(3))){ if($@debug){ debugmes "[F_GetItemByMap]: An error is occurupted"; debugmes "[Function arguments]: Function arguments are empty or to short. Arguments: "+getargcount(); debugmes "[Array sizes]: Maps:"+getarraysize(getarg(0))+" - Items:"+getarraysize(getarg(1))+" - Amounts:"+getarraysize(getarg(2))+" - Chances:"+getarraysize(getarg(3)); debugmes "[Function arguments]: Maps:"+getarg(0)+" - Items:"+getarg(1)+" - Amounts:"+getarg(2)+" - Chances:"+getarg(3); } return 0; } else { for(.i = 0; .i<getarraysize(getarg(0)); .i++){ if(rand(1,1000) < getelementofarray(getarg(3),.i)) return 2; if(strcharinfo(3) == getelementofarray(getarg(0),.i)){ getitem getelementofarray(getarg(1),.i),getelementofarray(getarg(2),.i); return 1; } else if($@debugmap){ return 3; } } } return 4; }
getItemByMapFunction v3.txt 4.14 kB · 1 download
Rynbef~
-
11 hours ago, kalabasa said:
is there a way to display properly on 2015 clients?
function Slot { set .@s$,getitemname(getarg(0)); switch(.ShowSlot) { case 1: if (!getitemslots(getarg(0))) break; case 2: if (getiteminfo(getarg(0), ITEMINFO_TYPE) == 4 || getiteminfo(getarg(0), ITEMINFO_TYPE) == 5) .@s$+=" ["+getitemslots(getarg(0))+"]"; } return "<ITEMLINK>" + .@s$ + "<INFO>" + getarg(0) + "</INFO></ITEMLINK>"; }
This for 2014 and under , in 2015 the disply changed , however not sure which month
Login / loading Screen Generator
in Client Requests
Posted