-
Posts
2044 -
Joined
-
Last visited
-
Days Won
51
Content Type
Profiles
Forums
Downloads
Jobs Available
Server Database
Third-Party Services
Top Guides
Store
Crowdfunding
Everything posted by AnnieRuru
-
probably due to getexp command, maybe you have quest_exp_rate changed getexp getmonsterinfo(killedrid,3),getmonsterinfo(killedrid,4); into set baseexp, baseexp + getmonsterinfo(killedrid,3); set jobexp, jobexp + getmonsterinfo(killedrid,4; EDIT: WTF post at same time
-
1. rid2name script command requires players to online 2. rid2name only search account_id on players if ((bl = map_id2bl(rid))) { switch (bl->type) { ..... case BL_PC: script_pushstrcopy(st,((TBL_PC *)bl)->status.name); break; the map_id2bl function in source, only store the information that is inside the map_server.exe if players is not online, the data is left inside SQL table ( which is why we can freely edit them once @kick them out ) and the type of information is already predefine in the source account ID starts with 2000000 and ends at 100000000if you start your test server and use getnpcid(0), it always start with 100000001 because these ranges are already predefined charID is somehow is in other range with other objects *Proof* prontera,153,182,5 script jhfksdjf 100,{ dispbottom " ==== "; dispbottom rid2name( 2000000 ); // Annieruru is online, return "Annieruru" dispbottom rid2name( 2000001 ); // Ennyruru is online, return "Ennyruru" dispbottom rid2name( 2000002 ); // Kinoruru is offline, return "(null)" dispbottom rid2name( getcharid(0) ); // your ownself CharID, which doesn't work, return "(null)" } emistry script on post#4 there which using rid2name sure doesn't work if the user has score a ladder in the board doesn't online will return "(null)" } else { ShowError("buildin_rid2name: invalid RID\n"); script_pushconststr(st,"(null)"); }
-
use guildlock mapflag to prevent them from leaving the guild in that map
-
your 2nd script .@rank = query_sql( "SELECT `char_id`,`value` FROM `global_reg_value` WHERE `str`='mobkill' ORDER BY `value` DESC LIMIT 10",.@cid,.@kill ); change into .@rank = query_sql( "SELECT `char_id`,`value` FROM `global_reg_value` WHERE `str`='mobkill' ORDER BY CAST( `value` AS SIGNED ) DESC LIMIT 10",.@cid,.@kill ); `value` in `global_reg_value` is a STRING type column, if the value has 1111,2222,12345 will be sort as 2222 12345 1111 because the first string is being sort 1st, as it is a string type ... it should be sort as integers, so do CAST( `value` AS SIGNED ) EDIT: another one rid2name( .@cid[.@i] ) I'm quite sure our rid2name script command doesn't support char ID field ..... try refer to this post to how it being made ...
-
prontera,153,182,5 script jhfksdjf 100,{ mes "these are the ones that has raced to level 150 in this server"; .@size = getarraysize( $race_level150_name$ ); if ( .@size ) { for ( .@i = 0; .@i < .@size; .@i++ ) mes ( .@i +1 )+". "+ $race_level150_name$[.@i]; } else mes "-> no record yet"; close; OnPCBaseLvUpEvent: if ( baselevel != 150 ) end; // if its not level150 ... ops just now I put 2 for testing purpose .@size = getarraysize( $race_level150_name$ ); if ( .@size == 5 ) end; // after 5th place, no more announce strcharinfo(0) +" has race to No."+( .@size +1 )+" position to level 150 !!", 0; if ( .@size == 0 ) // 1st place getitem 501, 1; else if ( .@size == 1 ) // 2nd place getitem 502, 1; else if ( .@size == 2 ) // 3rd place getitem 503, 1; else if ( .@size == 3 ) // 4th place getitem 504, 1; else if ( .@size == 4 ) // 5th place getitem 505, 1; $race_level150_name$[ .@size ] = strcharinfo(0); // save the record end; } simple script btw why you want the user to choose the item themself ? isn't that will create some kind of exploit ... also, if the 1st place user purposely don't want to claim an item, the rest will complain to GM they can't claim the reward
-
txt style ladder ... been some time I'm able to do this holiday_event_ladder.0.1.txt @emistry query_sql( "INSERT INTO `kill_rank` VALUES ( '"++"','1' ) ON DUPLICATE KEY UPDATE `kill`=`kill`+1" '"++"' is so weird missing strcharinfo(0) inside ?
-
btw let me remind something, for you and everyone else in this request section, we expecting your request is made based on your first post if you want to request for different feature, edit your first post, or open a new topic don't do something like this or this you are making other member's head spin your request on post#5 and post#11 is totally different than your post#1 EDIT: I almost feel like want to split topic just now ...
-
http://www.w3schools.../sql_delete.asp EDIT for below ... ok you should go learn some SQL before you ask this question again ... suddenly I feels like teaching someone about addition/subtraction, but he don't even know how to count the numbers go read some SQL guide on the internet EDIT2: exactly like what emistry said
-
prontera,155,180,5 script ljdshfksjd 100,{ if ( query_sql( "select 1 from itemperip where last_ip = '"+ getcharip() +"'", .@dummy ) ) goto L_nothx; else goto L_reward; L_nothx: mes "you already claimed the reward"; close; L_reward: query_sql "insert into itemperip values ( '"+ getcharip() +"' )"; mes "here is your item"; getitem 501,1; close; } btw this script kinda feel out of place utilizing SQL table to store information, but using newbie scripting style...
-
change if ( .@size ) { for ( .@i = 0; .@i < .@size; .@i++ ) { attachrid getd( ".@count"+ .@highest +"["+ .@i +"]" ); getitem .reward_item_id, .reward_item_amount; .@name$ = .@name$ +( ( .@i )? " , ":"" )+"["+ rid2name( getd( ".@count"+ .@highest +"["+ .@i +"]" ) ) +"]"; } mapannounce "guild_vs2", "event end, there are "+ .@size +" player having most "+ getitemname( .candy_id ) +" ! "+ .@name$, 0; } into if ( .@size ) { .@winner_index = rand(.@size); attachrid getd( ".@count"+ .@highest +"["+ .@winner_index +"]" ); getitem .reward_item_id, .reward_item_amount; mapannounce "guild_vs2", "event end, the winner is ["+ strcharinfo(0) +"] !!";, 0; }
-
change if ( .@rand < 20 ) getitem "goldcoin", 2; into if ( .@rand < 20 ) { getitem "goldcoin", 2; announce strcharinfo(0) +" has earn gold coin x2", bc_all; }
-
/* create table itemperIP ( last_ip varchar(20) primary key ) engine = innodb; */ prontera,155,180,5 script ljdshfksjd 100,{ if ( query_sql( "select 1 from itemperip where last_ip = '"+ getcharip() +"'", .@dummy ) ) dispbottom "you already claimed the reward"; else { query_sql "insert into itemperip values ( '"+ getcharip() +"' )"; dispbottom "here is your item"; getitem 501,1; } end; }
-
@Ryokem try to read battle_check_target function in battle.c return (flag&state)?1:-1; if its 1, then the target is attack-able if its -1 or 0, then the target cannot be attack I'm sure you can read the source file ... no need me to explain ... somehow I feel like you love to attack my post because I have no programming background @garet999 no need to be shame of yourself if you want to ask questions because I also did the same in the past http://www.eathena.w...howtopic=177218 http://www.eathena.w...howtopic=269819 http://www.eathena.w...howtopic=276305 learning is a lifetime process mark this topic as [solved]
-
this script is super unoptimized should have used 2 dimension array addheadgear1 ( <itemid>, <itemreqid1>, <itemreqamount1>, <itemreqid2>, <itemreqamount2> ... ) something like this anyway back on this beginner level script at the beginning of the script, set the original look by getlook set @look_top, getlook(LOOK_HEAD_TOP); set @look_middle, getlook(LOOK_HEAD_MID); set @look_bottom, getlook(LOOK_HEAD_BOTTOM); addtimer 1, strnpcinfo(0)+"::Onquit"; I_alarm: next; mes "1x Mr. Scream"; mes "3000x Clock Hands"; menu "Make",M_alarm,"Return to Menu",H_top; change into I_alarm: next; mes "1x Mr. Scream"; mes "3000x Clock Hands"; menu "Make",M_alarm,"Return to Menu",H_top,"View",V_M_alarm; and add this somewhere V_M_alarm: changelook LOOK_HEAD_TOP, <view ID>; // view ID of Mr.Scream menu "Return to menu",H_top; and this one too Onquit: // when the user already left the dialog changelook LOOK_HEAD_TOP, @look_top; changelook LOOK_HEAD_MID, @look_middle; changelook LOOK_HEAD_BOTTOM, @look_bottom; because this script is too unoptimized, probably you have to do every menu by yourself you are on your own though
-
http://rathena.org/board/forum-32/announcement-10-script-request-rules/
-
what are you doing ??? this topic has went in wrong direction change waitingroom "Red side", getvariableofnpc( .minplayer2start, "bg_emp#control" ) +1, "bg_emp#control::OnStart", getvariableofnpc( .minplayer2start, "bg_emp#control" ); into waitingroom "Red side", getvariableofnpc( .minplayer2start, "bg_emp#control" ) +1, "bg_emp#control::OnStart", getvariableofnpc( .minplayer2start, "bg_emp#control" ), 0, 150, 150; I want to repeat this again <.< I want to make a reminder that's why even though I already know how to script pvp/gvg script 3 years ago,now I am still learning how to produce battleground scripts its a totally different experience @cadz no I don't want <3 only rathena and eamod has custom battleground script release go figure out yourself, or switch to rathena
-
set .@rand, rand( 20+50+60 ); if ( .@rand < 20 ) getitem "goldcoin", 2; else if ( .@rand < 20+50 ) getitem "poringcoin", 5; else if ( .@rand < 20+50+60 ) set zeny, zeny + 50000000; I think you should see the trick sort the conditions from lowest chance to higher chance
-
of course it works like that if you want them to fight on sight, have to set them into aggressive monsters if you try with both monster ID 1001, sure works
-
if talking about bits our rathena has already using it in several ways my 1st impression when I saw keyworld script, is battle_check_target function in our SVN using the exact same wayI got experience on this because I always modify this function inside battle.c for gvg and battleground scripts also resemble how the way bonus4 item database script commands doing it needless to say our job system ... like eaclass made by skotlex btw from post#1 about easter bunny topic and post#6 to christmas event I still suggesting quest log system is more a practical method 1. quest log system need to patch data\questid2display.txt client side file 2. christmas also need to patch snow theme maps, something like this xD so everything about christmas theme, just patch everything about it 1 week before christmas also ... the christmas songs !! OnPCLoginEvent: playbgm "57"; message strcharinfo(0), "Merry Christmas !!"; sleep2 3000; message strcharinfo(0), "and a HAPPY NEW YEAR !!"; end; feels like christmas mood already XD
-
Limit PvP for Once per KILLEDRID per Day
AnnieRuru replied to serakh00's question in Scripting Support
oh I get what you mean now, you didn't want to use permanent player variable to save the kills but you "cheated" it with SQL tables ... but I can't really say its a nice trick or not /* create table last_pvp_kill ( killercid int(11) unsigned not null, killedcid int(11) unsigned not null, key killercid (killercid) ) engine = innodb; */ prontera,155,186,5 script ssdfdekjf 100,{ query_sql "delete from last_pvp_kill"; // clear the table ... use with OnClock0000: end; OnPCKillEvent: if ( killedrid == getcharid(3) ) end; if ( query_sql( "select 1 from last_pvp_kill where killercid = "+ getcharid(0) +" and killedcid = "+ getcharid( 0, rid2name( killedrid ) ), .@dummy ) ) // check if the user is in the list dispbottom "you have already killed that person today"; else query_sql "insert into last_pvp_kill values ( "+ getcharid(0) +" , "+ getcharid( 0, rid2name( killedrid ) ) +" )"; // insert into table end; } something like this I guess ? I'm quite sure doing like this kinda ... dunno how to say it ... -
I prefer to have it something like this *sendmail <Recipient Char ID>|"<Recipient name>", "<Sender's Name>", "<Title>", "<Body>", <zeny>, <item_id>, <amount>, {<refine>,<attribute>,<identify>,<card1>,<card2>,<card3>,<card4>}; most of the script commands are mostly dealing with account ID although getpartyleader and getguildmasterid can return char ID, but the rest almost dealing with account ID by using a character name, might be able to counter-use with rid2name( <recipient AID> ) without having to use attachrid and the refine ... attribute, its quite normal sometimes they want to send a refined items, or a signed items
-
its not about resource friendly, emistry's script doesn't even work because our emperium has event labels monster strnpcinfo(2),.@emproom[0],.@emproom[1],"Emperium",1288,1,"Agit#"+strnpcinfo(2)+"::OnAgitBreak"; "Agit#arug_cas01::OnAgitBreak" is the event label http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=1260 the purpose of OnNPCKillEvent is meant to be used in quest script and monsters with event labels is meant to be used in event script both of them shouldn't be mix together for example, in a poring event, a lot of porings is spawned, if OnNPCKillEvent allows to trigger for it, players might abused the system and gets the quest done instantly but because of event script, it has event labels, players will not abused the system to get it done from events but yeah, just add getitem under OnAgitBreak: and OnStartArena: rep up
-
if you talking about increasing hp (SC_APPLEIDUN) and increasing sp (SC_SERVICE4U) use these 2 better SC_INCMHPRATE 198 SC_INCMSPRATE 199 prontera,156,182,5 script kdhfksfhs 100,{ sc_start SC_INCMHPRATE, 10000, 100; sc_start SC_INCMSPRATE, 10000, 100; } increase hp/sp by 100% for 10 seconds and if you want to clear buff upon relog, check status_change_clear_buffs function inside status.c
-
2 semi-colons doesn't break the script dispbottom "EXP Bonus: "+EXPBoost+"%. You have recieved additionally "+@bexp+" Base EXP and "+@jexp+" Job EXP."; } } end; there are 2 closing brackets remove either of them last line }} // End function same here, remove either 1 of them I wonder is the original script also doesn't have proper indent ? edit, ok original script has proper indent ... you edited it
-
since this is a support section, I just point out the trick though 1. at the start up of the script, use a gettimestr(%Y%m%D) check if var != today, remove all variables produce in this script 2. after user done all quests for the 1st time, inside default: label set a new getd("Quest"+ strnpcinfo(2) +"done") and reward gold coin, and reset getd( "Quest"+strnpcinfo(2) ) variable 3. after user done all quest for 2nd time and above, inside default: label if ( getd("Quest"+ strnpcinfo(2) +"done" ), reward silver coin EDIT: btw I think this is emistry script ... his scripting style so resemble it EDIT2: yeah lol http://rathena.org/board/files/file/2495-chain-quest/