-
Posts
1691 -
Joined
-
Last visited
-
Days Won
76
Content Type
Profiles
Forums
Downloads
Jobs Available
Server Database
Third-Party Services
Top Guides
Store
Crowdfunding
Posts posted by sader1992
-
-
I smell a bot, however i will answer the question for future reference for others.
bindatcmd apply a command to all the server , triggering the script command by one player and expecting to give the command to that player only , will not work.
as for the event ondrop , it's the one that should been in the monster script command not an event to another event that redirect to the drop event.
-
your server doesn't match your client , if you are the server owner try to go in the database and remove anything the character wearing , or make a new account and forget that account if it's a GM account
what happening is your iteminfo lua file have some errors , and you have missing sprites too in your grf/data folder.
make sure when you edit the iteminfo you don't break it because of the encoding!
if all the files exist make sure they have the correct names
make sure the files are legit , you can use act editor
make sure the files are working.
-
On 11/22/2024 at 11:09 AM, rmon said:
Also getting the same issue
[Error]: buildin_rand: range (0) is too small. No randomness possible.
[Warning]: Script command 'rand' returned failure.
[Debug]: Source (NPC): AllInOne_RandomOption at prontera (147,171)
[Debug]: Source (NPC): AllInOne_RandomOption is located in: npc/custom/costume_enchant.txt
//Creating Group id 1 , with Hat items inside. AddGroup(1,2000001,2000002,2000006,2000007,2000023,2000038,2000039,2000040,2000043,2000044,2000045,2000046,2000047,2000048,2000049,2000050,2000053,2000068,2000069,2000070,2000071,2000072,2000073,2000074,2000075,2000076,2000077,2000078,3000006,3000012,3000035,3000037,3000039); //Group id 1 Options AddGroupOption(1,true,true); //Group id 1 Cost AddGroupCost(1,250000,0,0); //Group id 1 ReRoll Cost AddGroupReRollCost(1,500000,50,0); //Group id 1 Chances. AddGroupChance(1,100,30,20,10,5); //Group id 1 Random Option List. AddOpt(1,1,RDMOPT_ADDEXPPERCENT_KILLRACE_ALL,1,100);
are you using 1 option only ? are you using the latest version of the script ?
-
20 hours ago, Asterzu said:
Where? It is just a script, no solutions dropped by OP. I had the script and it still has the error.
Here are the errors that I had reloading itemdb and the script itself, I did all the recommended fix from past threads, like moving the db/re random option yml to db/import side.
Removing Renewal tags
Changing group ID, etc etc I have no other way to see how I can fix it.click here
if you still have a problem applying the random options system from renewal to pre-renewal please open a new post
and if you had a problem with the script , please reply on the script post instead of opening a new post
-
-
6 hours ago, medusa898 said:
hello sader. anything i can do with this reward function?
i don't understand what you mean , if the reported bug above , i fixed it in the new version.
-
Your post has nothing to do with scripting , the first 2 requests are database related, and the last one is src related , am moving your post the src requests, you can easily search in the db files to achieve the first 2 points
-
--------------------------------------- @loadnpc <path> Loads an NPC script by path. Example: @loadnpc npc/custom/jobmaster.txt --------------------------------------- @unloadnpc <npc name> Unloads an NPC. Example: @unloadnpc Job Master --------------------------------------- @unloadnpcfile <path> Unloads all NPCs in a file. Example: @unloadnpcfile npc/custom/jobmaster.txt --------------------------------------- @reloadnpcfile <path> Unloads and loads an NPC. Same as @unloadnpcfile and @loadnpc but ran as one command. Example: @reloadnpcfile npc/custom/jobmaster.txt ---------------------------------------
-
getStartOfDayTick function
getStartOfDayTick(<Day of the week>)
This function returns what the timetick would be on the provided next day of the week
Accept: SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAYDO NOT PM ME FOR ERRORS
Use the forum post to report for any bugs and errors HERE(Click Me)
I recommend to copy/paste the function to the end of the file 'rathena/npc/other/Global_Functions.txt'
This will make the function usable without 'callfunc' command
if you used the function inside an item or didn't put it to load first you will
need to use 'callfunc("getStartOfDayTick", <Day of the week>)' instead of 'getStartOfDayTick(<Day of the week>)'
-
Submitter
-
Submitted08/15/24
-
Category
-
Video
-
Content Authorsader1992
-
-
Version 1.1 Fixing an issue where sometimes the script break because of 'rand' function.
Nothing have changed in the script just the rnd function
if anyone want to update the script without replacing it , just replace the 'rnd' function at around line 210
with this
function rnd { if(getarg(0) == getarg(1)) return getarg(0); if(.HardBalance){ .@r = rand(getarg(0),getarg(1)); if(getarg(0) == .@r) return getarg(0); return rand(getarg(0),.@r); } return rand(getarg(0),getarg(1)); }
this should fix the problem where sometimes the script break because of the 'rand' function
-
1
-
-
please do not necropost an already answered post and is not related to the problem you are having....
here is your own post...
-
no not in the config but you can edit the script body directly
above
mes "Selected Item [" + getequipname(.@eq) + "]";
you can add something like this
switch(getequipid(.@eq)){ case xxxx: break; }
and edit those variables
.@zeny = int of the zeny cost .@cashpoint = int of the cashpoints cost .@costumpoint = int of the point cost .@item = array of the item id costs .@amount = array of the items amounts cost
for example:
i want Academy Completion Hat [1] to only cost 500 zeny
and Amistr Cap [0] to cost 7 red potions and 3 blue potion and 2000 zeny
it would be like this
switch(getequipid(.@eq)){ case 5407: //Academy Completion Hat [1] .@zeny = 500;// make zeny cost to 500 .@cashpoint = 0;// make cashpoint cost to 0 .@costumpoint = 0;//make point cost to 0 deletearray(.@item);//clear the item carray cost deletearray(.@amount);//clear the item amount cost break; case 5766: //Amistr Cap [0] .@zeny = 2000;// make zeny cost to 2000 .@cashpoint = 0;// make cashpoint cost to 0 .@costumpoint = 0;//make point cost to 0 deletearray(.@item);//clear the item carray cost deletearray(.@amount);//clear the item amount cost setarray .@item,501,505;// add red poiton and blue potion setarray .@amount,7,3;// add the amount of red potion and blue potion break; }
with that those two items will ignore any all the config cost and apply whats written here
-
what are item A and B in the script ? I see there is multiple items checked, not only 2
OnInit should be at the end of the script, or else each time the player will lick on the npc OnInit would run, you can just remove the OnInit event and use .@var instead , it's better to stay away from events because you are duplicating the npc
there is no .temp_array defined in the script , I assume you wanted .itemid
you should use 1 chance variable if you want the player to have 10% chance to get one of the items in the array just use if(rand(100) <= 10){//get item whatever }
keep in mind that countitem() == 1 means the player must have only 1 , no more no less , if you want don't care how many the player have , just remove the "== 1"
the "else" has no use snice the script will end if the "if" was true
I suggest you use a UNIQUE NPC NAME as a main
if you click on the NPC and nothing happens you would get an error code in the Console , read it and you would know why nothing happens when you click it.
I am not sure how you want the npc but here is an optimize to the script
- script ::TALL_GRASS_MAIN -1,{ setarray .@itemid[0], 40062,40063,40064,40065,40066; .@Chance = 10; mes "=== Select Tools ==="; switch(select("- Stone Blade:- Bone Blade:- Cancel")) { clear; case 1: if (rentalcountitem(40024) == 1){ if(countitem(40044) == 1){ getitem 40006, 1; getitem 40008, 1; end; } if(countitem(40067) == 1){ if(rand(100) <= .@Chance){ getitem .@itemid[rand(getarraysize(.@itemid))], 1; } getitem 40006, 1; end; } } mes "Stone Blade is needed."; close; case 2: if (rentalcountitem(40058) == 1 && countitem(40044) == 1 ){ getitem 40006, 1; getitem 40008, 1; end; } mes "Bone Blade is needed."; close; case 3: mes "Gathering Cancel"; close; } end; } // Duplicates //============================================================ neko_isle,75,122,6 duplicate(TALL_GRASS_MAIN) Tall Grass#new11 666 new_1-3,111,73,6 duplicate(TALL_GRASS_MAIN) Tall Grass#new12 666 new_1-3,115,71,6 duplicate(TALL_GRASS_MAIN) Tall Grass#new13 666 new_1-3,119,71,6 duplicate(TALL_GRASS_MAIN) Tall Grass#new14 666 new_1-3,123,71,6 duplicate(TALL_GRASS_MAIN) Tall Grass#new15 666 new_1-3,127,71,6 duplicate(TALL_GRASS_MAIN) Tall Grass#new16 666 new_1-3,131,72,6 duplicate(TALL_GRASS_MAIN) Tall Grass#new17 666
if that's not what you want , you might want to follow up with more details so people can help you with the script.
-
On 8/6/2023 at 9:42 AM, QueenPH said:
@Winterfox The 2nd link on your comment is gone ... why edit it??
her comment has a 2nd link on it if you do a back read...why edit it if there is no promblem on his commentthis is the comment that was gone on her message
"Anyway, you can download the illustrations here: https://anonfiles.com/dbn01d68z2/EP_18_Illustrations_7z "I did check the link and it's safe
Please stay on-topic , no need to argue about this anymore, he was just trying to help you even thought he didn't know how to do it
and please no more links to download websites .
-
7 hours ago, QueenPH said:
your link made my account in my game got hack and i got scam!
The link is safe if we didn't include the ads (ads exist everywhere not just that site)
the file is safe
you most-likely got hacked from some where else
-
11 hours ago, MrNobody said:
I ran the but nothing come out.. =(
please try again now with the new version, I added some exceptions, and some messages to clarify things up.
-
the image size shouldn't be the issue , the script should resize the image anyway.
look like the file path or name might be the problem , I will look into it , and maybe add a message if someone tried to double click the program instead of drag/drop the image on to it.
-
1
-
-
44 minutes ago, hendra814 said:
Thanks @sader1992
already working, but if i want change the option
where i should check the documentation for Random option
each random option have an item bonus under it
you can check all the random options in here
https://github.com/rathena/rathena/blob/master/db/re/item_randomopt_db.yml
-
On 3/2/2023 at 6:25 PM, hendra814 said:
if by equipment location is it possible?
instead of
.@gid = <Group ID>;
Use
.@gid = .@eq;
now this is the group ID for each location
EQI_ACC_L (0) - Accessory 1 EQI_ACC_R (1) - Accessory 2 EQI_SHOES (2) - Footgear (shoes, boots) EQI_GARMENT (3) - Garment (mufflers, hoods, manteaux) EQI_HEAD_LOW (4) - Lower Headgear (beards, some masks) EQI_HEAD_MID (5) - Middle Headgear (masks, glasses) EQI_HEAD_TOP (6) - Upper Headgear EQI_ARMOR (7) - Armor (jackets, robes) EQI_HAND_L (8) - Left hand (weapons, shields) EQI_HAND_R (9) - Right hand (weapons) EQI_COSTUME_HEAD_TOP (10) - Upper Costume Headgear EQI_COSTUME_HEAD_MID (11) - Middle Costume Headgear EQI_COSTUME_HEAD_LOW (12) - Lower Costume Headgear EQI_COSTUME_GARMENT (13) - Costume Garment EQI_AMMO (14) - Arrow/Ammunition EQI_SHADOW_ARMOR (15) - Shadow Armor EQI_SHADOW_WEAPON (16) - Shadow Weapon EQI_SHADOW_SHIELD (17) - Shadow Shield EQI_SHADOW_SHOES (18) - Shadow Shoes EQI_SHADOW_ACC_R (19) - Shadow Accessory 2 EQI_SHADOW_ACC_L (20) - Shadow Accessory 1
-
1
-
-
On 3/1/2023 at 8:55 AM, aoshinho said:
it's possible remove necessity of manually insert the item ID on item list? or just bypass it?
i tryed to create one function to auto add the item selected when selected by player in the item list array but i'ts work just to change collor of item in menu list
because i want to use that NPC in any itemYou can try replacing lines 45 to 49 with just .@gid = <Group ID>;
like this
remove
if(inarray(.item_list,.@id) == -1){ mes "Sorry , I cannot deal with this item!"; end; } .@gid = .it[.@id];
add
//.@gid = <Group ID>; .@gid = 1;
this should make all the items group id 1
-
On 2/27/2023 at 8:23 PM, aoshinho said:
Hi @sader1992
i tryed to add all hats ID's in group 1 but not working
emulator send me the error:
[Error]: script:run_script_main: infinity loop !
[Debug]: Source (NPC): RandomOption at prontera (147,171)
it's work for allowed item list but now i can't add option in any itemto fix this error on load you need to add
freeloop(1);
after
OnInit:
also You might need to add it after the start of the npc
before
disable_items;
this because the list of items you have is too long.
-
15 hours ago, AinsLord said:
hi sir @sader1992 i have this error using ur script
im using the lates rathena git
in my old rathena file works fine
PS: fixed alreadyit would be nice to mention what was the error and fix, Thank you.
-
This topic has been moved to the "Abandoned Projects" sub-forum.
If the author is still working on this project, they may request that a moderator moves the topic back and removes this post.
-
this where rAthena removed the password from this command
https://github.com/rathena/rathena/commit/2746e0d351fb141b9e55220778c8934dd45f4028
you can try to undo the changes and hope everything work after all this time
Disabled Zeny Trade
in Source Requests
Posted
the problem with this idea is even if you disabled zeny trading there still items , people can then use items to sell or move zeny between accounts.