-
Posts
10018 -
Joined
-
Days Won
408
Content Type
Profiles
Forums
Downloads
Jobs Available
Server Database
Third-Party Services
Top Guides
Store
Crowdfunding
Everything posted by Emistry
-
menu "Last Warp ^777777["+lastwarp$+"]^000000",-, " ~ Towns",Towns, " ~ Fields",Fields, " ~ Dungeons",Dungeons, " ~ Guild Castles",Castles, " ~ Guild Dungeons",Guild_Dungeons, " ~ Instances",Instances, " ~ Special Areas",Special; change to menu "Last Warp ^777777["+lastwarp$+"]^000000",-, " ~ Towns",Towns, " ~ Fields",Fields, " ~ Dungeons",Dungeons, " ~ Guild Castles",Castles;
-
mr smile npc/pre-re/scripts_athena.conf#L81 npc/re/scripts_athena.conf#L152 guide npc npc/pre-re/scripts_athena.conf#L14-L35 npc/re/scripts_athena.conf#L21-L51
-
something like.. TRUNCATE TABLE `skill`; UPDATE `char` SET `class` = 0, `base_level` = 1, `job_level` = 1, `base_exp` = 0, `job_exp` = 0, `str` = 1, `agi` = 1, `vit` = 1, `int` = 1, `dex` = 1, `luk` = 1, `status_point` = 25, `skill_point` = 0, `body` = 0, `weapon` = 0, `shield` = 0 ; UPDATE `inventory` SET `equip` = 0; make sure you backup before execute.. @hendra814 maybe he wanted to keep the progress of the char, example quest, variable, ranking or etc...especially anything that tied with char_id
-
cmd_in02,181,98,2 script Dice Dealer 57,{ set .itemid, 501; set .MaxDiceBet,30000; mes "[Dyceman]"; mes "We each roll two dice and the highest total wins. I will match however much money you put in."; goto DiceStart; close; DiceStart: next; if(select("Lets throw some dice!", "Not wasting a "+getitemname(.itemid)+"!") == 2) { mes "[Dyceman]"; mes "Please come again!"; close; } mes "[Dyceman]"; mes "How much "+getitem(.itemid)+" would you like to bet?"; switch(prompt( "50 "+getitem(.itemid), "100 "+getitem(.itemid), "200 "+getitem(.itemid), "Custom Amount" )) { case 1: set .@BetAmount,50; break; case 2: set .@BetAmount,100; break; case 3: set .@BetAmount,200; break; case 4: input .@BetInput; if(.@BetInput < 1 || .@BetInput > .MaxDiceBet) { next; mes "[Dyceman]"; mes "You must enter a number between ^FF00001^000000 and ^FF0000"+.MaxDiceBet+" "+getitem(.itemid)+"^000000."; goto DiceStart; close; } set .@BetAmount,.@BetInput; next; mes "[Dyceman]"; mes "You bet ^008800"+.@BetAmount+" "+getitem(.itemid)+"^000000!"; break; default: case 255: mes "[Dyceman]"; mes "Please come again!"; close; } next; mes "[Dyceman]"; if(countitem(.itemid) < .@BetAmount) { mes "You you don't have enough "+getitem(.itemid)+" to make that bet!"; close; } delitem .itemid, .@BetAmount; set trustfundbalance, trustfundbalance + (.@BetAmount / 100); mes "The dice have been thrown..."; next; while (.@dice_roll < 3) { set .@DiceRoll,rand(1,3); if(.@DiceRoll==1) { mes "roll..."; } if(.@DiceRoll==2) { mes "roll... roll..."; } else { mes "roll... roll... roll..."; } next; set .@dice_roll, .@dice_roll + 1; } set .@diceroll1a,rand(1,6); set .@diceroll1b,rand(1,6); set .@dice1numtotal,(.@diceroll1a+.@diceroll1b); set .@diceroll2a,rand(1,6); set .@diceroll2b,rand(1,6); set .@dice2numtotal,(.@diceroll2a+.@diceroll2b); next; mes "[Dyceman]"; mes "You rolled a ^0000FF"+.@diceroll2a+"^000000 and ^0000FF"+.@diceroll2b+"^000000!"; mes " "; mes "I rolled a ^0000FF"+.@diceroll1a+"^000000 and ^0000FF"+.@diceroll1b+"^000000!"; next; mes "[Dyceman]"; if(.@dice1numtotal>.@dice2numtotal) { mes "My ^0000FF"+.@dice1numtotal+"^000000 beats your ^0000FF"+.@dice2numtotal+"^000000!"; next; mes "[Dyceman]"; mes "I win, your ^008800"+.@BetAmount+"z^000000 is mine!"; } else if(.@dice1numtotal<.@dice2numtotal) { mes "Your ^0000FF"+.@dice2numtotal+"^000000 beats my ^0000FF"+.@dice1numtotal+"^000000!"; getitem .itemid, (.@BetAmount * 2); next; mes "[Dyceman]"; mes "You won ^008800"+(.@BetAmount*2)+"z^000000. I will get your "+getitem(.itemid)+" next time!"; } else if(.@dice1numtotal==.@dice2numtotal) { mes "Draw, let's play again!"; getitem .itemid, .@BetAmount; set trustfundbalance,trustfundbalance - ( .@BetAmount / 100); goto DiceStart; } close; }
-
Scripts UTF-8-BOM not working in Rathena sever
Emistry replied to tathanngudong's question in Script Requests
change your langtype for it to support any languages other than english. langtype 11 or 13 should work i think -
try this. prontera,155,181,5 script Sample 4_F_KAFRA1,{ if (getgmlevel() >= 99) { mes "Do you want to remove an item from a player's inventory?"; if (select("Yes", "No") == 1) { mes "Player name?"; input .@player_name$; .@aid = getcharid(3, .@player_name$); if (!.@aid) { mes "Player isn't online."; .@aid = 0; } else { mes "Item ID?"; input .@item_id; if (getitemname(.@item_id) == "null" || getitemname(.@item_id) == "") { mes "Invalid items"; .@item_id = 0; } } } close2; if (.@aid > 0 && .@item_id > 0) { if (attachrid(.@aid)) { .@count = countitem(.@item_id); if (.@count > 0) { delitem .@item_id, .@count; mes "A GM removed "+.@count+"x "+getitemname(.@item_id)+" from your inventory."; close2; } } } } else { npctalk "Only GM can use this npc."; } end; }
-
try this. cmd_in02,181,98,2 script Dice Dealer 57,{ set .itemid, 501; set .MaxDiceBet,30000; mes "[Dyceman]"; mes "We each roll two dice and the highest total wins. I will match however much money you put in."; goto DiceStart; close; DiceStart: next; if(select("Lets throw some dice!", "Not wasting a "+getitem(.itemid)+"!") == 2) { mes "[Dyceman]"; mes "Please come again!"; close; } mes "[Dyceman]"; mes "How much "+getitem(.itemid)+" would you like to bet?"; switch(prompt( "50 "+getitem(.itemid), "100 "+getitem(.itemid), "200 "+getitem(.itemid), "Custom Amount" )) { case 1: set .@BetAmount,50; break; case 2: set .@BetAmount,100; break; case 3: set .@BetAmount,200; break; case 4: input .@BetInput; if(.@BetInput < 1 || .@BetInput > .MaxDiceBet) { next; mes "[Dyceman]"; mes "You must enter a number between ^FF00001^000000 and ^FF0000"+.MaxDiceBet+" "+getitem(.itemid)+"^000000."; goto DiceStart; close; } set .@BetAmount,.@BetInput; next; mes "[Dyceman]"; mes "You bet ^008800"+.@BetAmount+" "+getitem(.itemid)+"^000000!"; break; default: case 255: mes "[Dyceman]"; mes "Please come again!"; close; } next; mes "[Dyceman]"; if(countitem(.itemid) < .@BetAmount) { mes "You you don't have enough "+getitem(.itemid)+" to make that bet!"; close; } delitem .itemid, .@BetAmount; set trustfundbalance, trustfundbalance + (.@BetAmount / 100); mes "The dice have been thrown..."; next; while (.@dice_roll < 3) { set .@DiceRoll,rand(1,3); if(.@DiceRoll==1) { mes "roll..."; } if(.@DiceRoll==2) { mes "roll... roll..."; } else { mes "roll... roll... roll..."; } next; } set .@diceroll1a,rand(1,6); set .@diceroll1b,rand(1,6); set .@dice1numtotal,(.@diceroll1a+.@diceroll1b); set .@diceroll2a,rand(1,6); set .@diceroll2b,rand(1,6); set .@dice2numtotal,(.@diceroll2a+.@diceroll2b); next; mes "[Dyceman]"; mes "You rolled a ^0000FF"+.@diceroll2a+"^000000 and ^0000FF"+.@diceroll2b+"^000000!"; mes " "; mes "I rolled a ^0000FF"+.@diceroll1a+"^000000 and ^0000FF"+.@diceroll1b+"^000000!"; next; mes "[Dyceman]"; if(.@dice1numtotal>.@dice2numtotal) { mes "My ^0000FF"+.@dice1numtotal+"^000000 beats your ^0000FF"+.@dice2numtotal+"^000000!"; next; mes "[Dyceman]"; mes "I win, your ^008800"+.@BetAmount+"z^000000 is mine!"; } else if(.@dice1numtotal<.@dice2numtotal) { mes "Your ^0000FF"+.@dice2numtotal+"^000000 beats my ^0000FF"+.@dice1numtotal+"^000000!"; getitem .itemid, (.@BetAmount * 2); next; mes "[Dyceman]"; mes "You won ^008800"+(.@BetAmount*2)+"z^000000. I will get your "+getitem(.itemid)+" next time!"; } else if(.@dice1numtotal==.@dice2numtotal) { mes "Draw, let's play again!"; getitem .itemid, .@BetAmount; set trustfundbalance,trustfundbalance - ( .@BetAmount / 100); goto DiceStart; } close; } anyway, you should at least try search the forum, these npc scripts are easily can be found on forum.
-
this npc script should work for you OnPCStatCalcEvent: if (isequipped(5022)) { if (getmapflag(strcharinfo(3), mf_town)) { bonus bSpeedAddRate,100; } } end;
-
Scripts UTF-8-BOM not working in Rathena sever
Emistry replied to tathanngudong's question in Script Requests
perhaps you should use UTF-8 and not UTF-8-BOM ... I am not sure if the text are valid since I cant read the language. -
RO Patcher Lite, v4.5.0.1340 - last updated 2024/09/21
Emistry replied to Ai4rei's topic in Client Releases
Exactly what I am looking for... I was thinking if there are any ways and what are the parameters to use in CLI. Thx for this, will try it. @Slammer nope, its not the exact way I want it to be. Doesnt want to setup another tasks just to kill the process, beside we wont be able to make sure it kill the process after the update are completed. I noticed that sometime after update, it detected the "wasted space" and asked the user whether to repack the files. Do we have any parameters that used to skip the confirmation message and proceed with repack upon detected waste spaces? /repak Forces complete rebuild of the main GRF archive reclaiming all wasted space. Note, that this process may take a while for larger archives and you must have at least same amount of space free, as the main GRF archive takes up. The patcher asks you automatically about repacking, once too much wasted space is detected inside the archive. i saw in the doc... but this seem to repack the grf everytime it updated. is this the only option we have? btw, i tried with 2 parameters, it doesnt seem like work well. rsu.exe /updateonly /repak it completed the update, but doesn't exit the rsu.exe and the repak aren't executed too. it work fine if i run with only 1 parameter for both /updateonly and /repak -
conf/battle/misc.conf#L64-L75 its daytime by default....
-
.@str = ((readparam(bStr) * 110) / 100); // STR 110%
-
RO Patcher Lite, v4.5.0.1340 - last updated 2024/09/21
Emistry replied to Ai4rei's topic in Client Releases
Just a random thought... I am looking for a way to automatically execute the RO patcher lite every month to update the kRO or iRO or any others... At the moment, I manage to do this by using task scheduler to auto execute this program and update the RO. However, all it does are just startup this program, but it cant auto close/kill the program when the update completed.. Is there a way for us to run this RO patcher lite to update the kRO..and then auto close it once the update its done? something like we do this through a command prompt process and run in the background if it even possible? -
You need a value for both .@rand_x and .@rand_y variable. Your current script move the NPC to coordinate 0,0 .. hence it disappeared. use something like rand(<number>) to return a random coordinate for the npc to move.
-
create a npc with the treasure chest sprite, hide the npc by default, and unhide it when your player killed the mvp which trigger any events to unhide it.
-
help with party broadcaster npc, else not being read
Emistry replied to drifterxxxx2's question in Scripting Support
prontera,147,165,5 script Broadcaster NPC 503,{ set .name$,"[Broadcaster]"; set .Minutes,1; if( .DelayTime > gettimetick(2) ){ set .last,.DelayTime - gettimetick(2); set .@min, .last % (24*60*60) % (60*60) / (60); set .@sec, .last % (24*60*60) % (60*60) % (60); mes "[Broadcaster]"; mes "cant send another meesage in "+.@min+" minutes "+.@sec+" secs"; } else { mes .name$; mes "hi ^0000FF"+strcharinfo(0)+"^000000 ."; mes "do you want to look for party for ^FF000050.000^000000z.?"; mes "remember, you agree to follow the ^5533AArules^000000.\n"; mes "for more information please visit us at."; switch( select("yes","nope")) { case 1: next; mes .name$; mes "what is your ^FF0000job^000000?\n"; mes "you can also add your friends here."; input(.Message1$); if (getstrlen(.Message1$) < 25) { next; mes .name$; mes "and your level?\n"; mes "numbers 1-175"; input(.Message2); } if (.Message2 > 1) || (.Message2 < 175) { close2; set .DelayTime,gettimetick(2) + ( .Minutes * 1 ); set zeny,zeny-100000; announce "["+strcharinfo(0)+"] is looking for party to play as "+.Message1$+" level "+.Message2+". please send him a message",0,0x007799,14; end; } else { next; mes .name$; mes "message not valid."; mes "must be less than 25 characters and from 1-175."; mes "try again."; close; } case 2: next; mes .name$; mes "come back anytime."; close; } } close; } -
Need confirmation.. Can we auto-screenshot within the scripts?
Emistry replied to rakuzas's question in Script Requests
you can use logmes to log all the data you need into the log txt file. doc/script_commands.txt#L7107 or query_sql to log all the data you need into your SQL server doc/script_commands.txt#L8020-L8035 -
configure this file... conf/grf-files.txt and run the MapCache.exe that found in your rA solution files.
-
if its caused by NPC script... make sure you have provided the correct mapname .... attach the npc scripts here to others can check for it. and...perhaps you may consider avoid using WeeMapCache since it has some issues with building the mapcache use the mapcache.exe which already provided.
-
something like this? https://pastebin.com/24PDW2Cg
-
Is it possible to sort items by name or do we have to do it manually?
Emistry replied to anjasoleil1's question in Scripting Support
you can try refer to this topic to adjust your script. change the SQL query to order the result based on item name...something... SELECT * FROM `item_db` ORDER BY `item_db`.`item_name` make sure you have the complete SQL table with data inside. Just play around with the SQL query. -
OnClock0951: donpcevent strnpcinfo(3)+"::OnResetStock"; announce "[Stock Market] Our stock has been reset!",bc_all,0xFF0000; set $S_LastUpd$,"12:00"; goto S_Fluc; end; OnResetStock: query_sql "DELETE FROM `acc_reg_num` WHERE `key` LIKE '#S%'"; addrid(0); for (.@i = 1; .@i <= 10; .@i++) { setd("#S"+.@i, 0); } // dispbottom "Stock has reset."; end; you can try something like this..... remove from SQL + attach online player and clear their variables.
-
UPDATE `rAthena`.`item_db_re` t1 INNER JOIN `brAthena`.`item_db_re` t2 ON `t1`.`id` = `t2`.`id` SET `t1`.`name` = `t2`.`name_japanese`;
-
@Dream Catcher Perhaps you should check which table store the item_db_re info of yours? You didnt provide any info of which or whatever was the name of your item_db_re named. @Psychonaut has provided a solution, but you havent able to test it out since you keep doing it the wrong way. You didnt replace to the correct sql table based on your own database setting Check your database settings and adjust the table name correctly.
-
User Online Roulette Script don't work right, need help.
Emistry replied to Innos's question in Scripting Support
for(set .@i,0; .@i < getarraysize(.@aid); set .@i,.@i+1) { if (attachrid(.@aid[.rand3])) { getitem 501,1; } } change to if (attachrid(.@aid[.rand3])) { getitem 501,1; }