-
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
-
- script jfksdhfkjs -1,{ OnNPCKillEvent: if ( getmonsterinfo( killedrid, MOB_MVPEXP ) || rand(100) < 40 ) { if ( getcharid(1) ) { getpartymember getcharid(1), 1; getpartymember getcharid(1), 2; for ( .@i = 0; .@i < $@partymembercount; .@i++ ) { if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) { // what happens if someone in the party member is offline =/ .@partymemberaid[.@c] = $@partymemberaid[.@i]; .@c++; } } getitem 607, 3, .@partymemberaid[ rand( .@c ) ]; announce "Party ["+ strcharinfo(1) +"] has killed "+ getmonsterinfo( killedrid, MOB_NAME ) +" at "+ strcharinfo(3), 0; } else { getitem 607, 3; announce "Player ["+ strcharinfo(0) +"] has killed "+ getmonsterinfo( killedrid, MOB_NAME ) +" at "+ strcharinfo(3), 0; } } end; }
-
.... swt ... I thought your script getting better and better, but it just getting more screw up nvm, I do it - script jfksdhfkjs -1,{ OnNPCKillEvent: if ( !getmonsterinfo( killedrid, MOB_MVPEXP ) ) end; if ( getcharid(1) ) { getpartymember getcharid(1), 1; getpartymember getcharid(1), 2; for ( .@i = 0; .@i < $@partymembercount; .@i++ ) { if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) { // what happens if someone in the party member is offline =/ .@partymemberaid[.@c] = $@partymemberaid[.@i]; .@c++; } } getitem 607, 3, .@partymemberaid[ rand( .@c ) ]; announce "Party ["+ strcharinfo(1) +"] has killed "+ getmonsterinfo( killedrid, MOB_NAME ) +" at "+ strcharinfo(3), 0; } else { getitem 607, 3; announce "Player ["+ strcharinfo(0) +"] has killed "+ getmonsterinfo( killedrid, MOB_NAME ) +" at "+ strcharinfo(3), 0; } end; } your event script writing needs more experiences @MrVandalBus OnNPCKillEvent is correct
-
I help solve ScriptingPhailure's math homework in 30 minutes ( math is my favorite subject xD ) after helping him, he ran away and play basketball and now I have the hill WTF !!! I have go take a look @_@
-
if there's any map designer who is interested looking for a scripter to write pvp/gvg/battleground script, I'm willingly to write for free XD
-
yeah, this script was originated from here at that time, woe:se was still under developing in this case, there's no need for SQL table since there's only 1 guild ID is stored prontera,156,177,5 script WoE Prize 100,{ // setcastledata "prtg_cas01", 1, getcharid(2); // debug if ( agitcheck() ) { mes "A war is currently in progress"; mes "If your guild owned a castle ask your guild master to see me to claim the reward"; close; } select "Kriemhild [Primary Castle]"; if ( getcastledata( "prtg_cas01", 1) != getcharid(2) ) { mes "Your guild failed to take this castle"; close; } if ( $castle_claimed[1] ) { mes "Your guild already received the reward for this castle"; close; } if ( getguildmasterid( getcharid(2) ) != getcharid(0) ) { mes "Ask your Guild Master to see me"; close; } mes "receiving the reward for this castle"; if ( $castle_prtg1_gid != getcharid(2) ) { $castle_claimed_times[1] = 0; $castle_prtg1_gid = getcharid(2); } if ( !$castle_claimed_times[1] ) { // 1st time getitem 7960,200; getitem 12103,20; getitem 7959,20; } else if ( $castle_claimed_times[1] == 1 ) { // 2nd time getitem 7960,250; getitem 12103,30; getitem 7959,30; } else { // 3rd time onwards getitem 7960,300; getitem 12103,40; getitem 7959,40; } $castle_claimed[1] = 1; $castle_claimed_times[1]++; close; OnAgitEnd: $castle_claimed[1] = 0; // everytime woe ends the variable resets end; OnInit: waitingroom "Kriemhild Reward",0; end; } btw this topic feels like a request, so move over there
-
[Showcase] The Ice Palace by Olrox
AnnieRuru replied to Olrox's topic in Maps & 3D Modeling Showcase
I also remember the time when I made mission board scriptI sprint my endurance for 2 whole weeks just onto this single script, ( when go to sleep, thinking about what should I add which features to this script tomorrow, next day when wake up, 1st thing to do is switch on the computer and review back my incomplete script before goes to work and when its finally finished, that kind of feeling ... xD .... I understand that XD ) I took a full rest for 2 whole weeks after finished it XD put everything that you have learned into 1 single project, and it becomes your masterpiece same here xDI also lost count how many scripts I have written ... probably over 1,500 now xD and seriously ... your map designing has already surpass official maps ... damn ... I want to learn map-designing, and somehow feel its getting further and further if I want to do the same thing as you... -
hmm, your script doesn't make use of dynamic menu I already spotted that this part is being repeated I suggest this kind of script is better to make use of 2-dimension array and I provide an example prontera,156,179,5 script Dolly 100,{ mes "Which item do you want?"; next; .@s = select( .menu$ ) -1; if ( .@s == .total_quest ) { mes "So you don't want anything? Come back when you do!"; close; } mes "I require the following:^FF0000"; .@size = getarraysize( getd(".quest"+ .@s ) ); for ( .@i = 1; .@i < .@size; .@i += 2 ) mes getd( ".quest"+ .@s +"["+( .@i +1 )+"]" ) +" "+ getitemname( getd( ".quest"+ .@s +"["+ .@i +"]" ) ); mes "^000000In exchange, I will give you:^00FF00"; mes getitemname( getd( ".quest"+ .@s +"[0]") ); next; if ( select("Exchange:No thanks") ==2 ) close; for ( .@i = 1; .@i < .@size; .@i += 2 ) { if ( countitem( getd( ".quest"+ .@s +"["+ .@i +"]" ) ) < getd( ".quest"+ .@s +"["+( .@i +1 )+"]" ) ) { mes "You do not have enough of "+ getitemname( getd( ".quest"+ .@s +"["+ .@i +"]" ) ); mes "Required: "+ getd( ".quest"+ .@s +"["+( .@i +1 )+"]" ); mes "Current: "+ countitem( getd( ".quest"+ .@s +"["+ .@i +"]" ) ); mes "Needed: ^FF0000 "+( getd( ".quest"+ .@s +"["+( .@i +1 )+"]" ) - countitem( getd( ".quest"+ .@s +"["+ .@i +"]" ) ) ); close; } } for ( .@i = 1; .@i < .@size; .@i += 2 ) delitem getd( ".quest"+ .@s +"["+ .@i +"]" ), getd( ".quest"+ .@s +"["+( .@i +1 )+"]" ); getitem getd( ".quest"+ .@s +"[0]" ), 1; announce strcharinfo(0) +" has gotten a "+ getitemname( getd( ".quest"+ .@s +"[0]" ) ), 0; close; OnInit: setarray .quest0, 5137, 2210,1,5141,1,7047,500; setarray .quest1, 5344, 2210,1,5141,1,1060,500; setarray .quest2, 5137, 2210,1,5141,1,1034,500; setarray .quest3, 5341, 2210,1,5141,1,7122,150,1034,200; setarray .quest4, 5253, 2210,1,5141,1,7142,1,1060,150; setarray .quest5, 5344, 2254,1,5141,1,7104,350; setarray .quest6, 5342, 2210,1,5141,1,7152,300; setarray .quest7, 5526, 2210,1,5141,1,1048,400; setarray .quest8, 5343, 2210,1,5141,1,1020,200,1034,200; setarray .quest9, 5345, 2210,1,5141,1,1060,500; setarray .quest10, 5464, 2210,1,5141,1,1020,400,7166,400; for ( .@i = 0; getd( ".quest"+ .@i ); .@i++ ) { .menu$ = .menu$ + getitemname( getd( ".quest"+ .@i ) ) +":"; .total_quest++; } .menu$ = .menu$ +"Cancel"; end; } the 1st index of every setarray is the reward item, since your script only has 1 kind of reward item anyways
-
Multi Quests in a Npc with multi reward id.
AnnieRuru replied to Shogun's question in Script Requests
if you want a crazy level script( sry this kind of script is a bad example for the community ... its only meant for certain individuals who wants to challenge this level of script ) http://www.eathena.ws/board/index.php?showtopic=242306 or tron's quest board might be a better solution https://rathena.svn.sourceforge.net/svnroot/rathena/trunk/npc/custom/quests/questboard.txt -
Making this script more than one (like duplicate)
AnnieRuru replied to Seiro's question in Scripting Support
prontera,156,180,5 script kjdhfksjf 100,{ monster "this", -1,-1, "--ja--", 1002, 1, "", 0; monster "this", -1,-1, "--ja--", 1002, 1, "", 1; monster "this", -1,-1, "--ja--", 1002, 1, "", 2; } I think we have complicated the solution with advance scripting technique, here is the solution that you can understand better prontera,155,181,4 script AutoSummon#1 -1,3,3,{ end; OnTouch: if ( .summon_timetick + .spawn_delay > gettimetick(2) || mobcount( "this", strnpcinfo(0)+"::Onaa" ) ) end; monster "this", 155, 181, "--ja--", 1953, 1, strnpcinfo(0)+"::Onaa", 1; // small size mob .summon_timetick = gettimetick(2); sleep 60000; // 60 seconds auto-kill this mob killmonster strnpcinfo(4), strnpcinfo(0) +"::Onaa"; end; OnInit: .spawn_delay = 120; // a delay of 120 seconds Onaa: // prevent server spam error end; } -
what what what .... OMFG forgotten about *getmobdrops rep up and move back to script request ( shame on myself ... ) - script test123 -1,{ OnInit: bindatcmd "alootnoitem", strnpcinfo(0)+"::OnAtcommand"; end; OnAtcommand: .@nodropitemid = atoi( .@atcmd_parameters$[0] ); .@mob_id = atoi( .@atcmd_parameters$[1] ); if ( !.@nodropitemid || !.@mob_id ) { message strcharinfo(0), "@alootnoitem <Item ID> <Mob ID>"; end; } if ( getitemname( .@nodropitemid ) == "null" ) { message strcharinfo(0), "@alootnoitem -> Invalid Item ID"; end; } if ( !strmobinfo( 3, .@mob_id ) ) { message strcharinfo(0), "@alootnoitem -> Invalid Mob ID"; end; } atcommand "@alootid reset"; // reset getmobdrops .@mob_id; for ( .@i = 0; .@i < $@mobdrop_count; .@i++ ) if ( .@nodropitemid != $@mobdrop_item[.@i] ) atcommand "@alootid +"+ $@mobdrop_item[.@i]; // atcommand "@alootid"; //show list <-- its already display in the list end; }
-
http://www.eathena.w...howtopic=262755 this script has a minor bug change this OnPCDieEvent: into OnPCDieEvent: OnPCLogoutEvent: and add guildlock mapflag at the end of the script then should be working as a new
-
hahaha xD ok... Sryx script ... using $first, $second, $third variable however, that is actually not the really correct way because if let's say, the guild "ABC" conquer the castle, claimed the $first prize guild "DEF" conquer the castle on 2nd week, will be able to claimed the $second prize without even go through 1st set of reward and also, this part will definitely throw error OnAgitEnd: set $castle_claimed[1], set $castle_claimed[2], set $castle_claimed[3], 0; // everytime woe ends the variable resets make sure every sentence is enclosed with ";" semi-colon symbol mindstream script ... script might be working, but doesn't work to the concept of topic starter I believe what he is saying means if guild "ABC" conquer the castle for on the 1st week, can get 1st set of reward if guild "ABC" conquer that castle again on the 2nd week, then able to get 2nd set of the reward your script there actually allow the guild "ABC" able to reward 3 sets of reward in 1st try lol if I do this, I'll make use of SQL table instead of saving it with global permanent variable because if using global permanent variable, need to do something like setd "castle_claimed"+ getcharid(2), getd( "castle_claimed"+ getcharid(2) ) + 1; if ( getd( "castle_claimed"+ getcharid(2) ) == 1 ) < claim 1st set of reward > if ( getd( "castle_claimed"+ getcharid(2) ) == 2 ) < claim 2nd set of reward > if ( getd( "castle_claimed"+ getcharid(2) ) >= 3 ) < claim 3rd set of reward > which might actually able to build up quite a ton of variables in `mapreg` table /* create table castle_reward ( guild_id int(11) primary key, claimed int(11) ); engine = innodb; */ prontera,156,177,5 script WoE Prize 100,{ setcastledata "prtg_cas01", 1, getcharid(2); // debug if ( agitcheck() ) { mes "A war is currently in progress"; mes "If your guild owned a castle ask your guild master to see me to claim the reward"; close; } select "Kriemhild [Primary Castle]"; if ( getcastledata( "prtg_cas01", 1) != getcharid(2) ) { mes "Your guild failed to take this castle"; close; } if ( $castle_claimed[1] ) { mes "Your guild already received the reward for this castle"; close; } if ( getguildmasterid( getcharid(2) ) != getcharid(0) ) { mes "Ask your Guild Master to see me"; close; } mes "receiving the reward for this castle"; query_sql "select claimed from castle_reward where guild_id = "+ getcharid(2), .@claimed; if ( !.@claimed ) { // 1st time getitem 7960,200; getitem 12103,20; getitem 7959,20; } else if ( .@claimed == 1 ) { // 2nd time getitem 7960,250; getitem 12103,30; getitem 7959,30; } else { // 3rd time onwards getitem 7960,300; getitem 12103,40; getitem 7959,40; } set $castle_claimed[1], 1; query_sql "insert into castle_reward values ( "+ getcharid(2) +", 1 ) on duplicate key update claimed = claimed +1"; close; OnAgitEnd: set $castle_claimed[1], 0; // everytime woe ends the variable resets end; OnInit: waitingroom "Kriemhild Reward",0; end; }
-
DevilEvil has edited other member's post, and its not fair that we are not able to do the same >__< please play this fairly, and now I have the hill
-
there is no script command can control ( manually remove out single ) item on the floor so move to source modification request
-
http://rathena.org/board/topic/72526-soundeffect-script/#entry146761... hey ... that's ... you ....
-
<Removed previous script> its working fine for me try test your custom soundeffect by gm-command @sound triplekill //http://rathena.org/board/topic/57784-request-dota-runes/page__fromsearch__1 pvp_y_1-2,1,1,5 script Runes 802,2,2,{ dispbottom "Walkthrough to get Runes."; end; OnTouch: switch ( .current_rune ) { default: sc_start sc_incatkrate, .duration * 1000, 100; sc_start sc_incmatkrate, .duration * 1000, 100; soundeffect "killingspree.wav", 0; break; case 1: // skill "AS_CLOAKING",10,1; <-- I played Dota, it doesn't gives you windwalk skill, just invisibility // sc_start sc_cloaking, .duration * 1000, 10; <-- sc_cloaking shouldn't be use also ... should be setoption setoption 0x4, 1; addtimer .duration * 1000, strnpcinfo(0) +"::OncloakingUp"; soundeffect "doublekill.wav", 0; break; case 2: // sc_start4 sc_regeneration, .duration * 1000, -10, 1,0,0; sc_start sc_regeneration, .duration * 1000, 50; // <-- tested this one better soundeffect "triplekill.wav", 0; break; case 3: getmapxy .@map$, .@x, .@y, 0; clone .@map$, .@x, .@y, "", getcharid(0), getcharid(0) , 0, 1, .duration; clone .@map$, .@x, .@y, "", getcharid(0), getcharid(0) , 0, 1, .duration; soundeffect "holyshit.wav", 0; break; case 4: sc_start sc_speedup1, .duration * 1000, 0; soundeffect "rampage.wav", 0; } announce "[ "+strcharinfo(0)+" ] has gained "+ .rune_name$[ .current_rune ] +".",bc_map,0x00FF00; delwaitingroom; disablenpc strnpcinfo(0); sleep .duration * 1000; enablenpc strnpcinfo(0); OnStart: .@r = rand( .coordinate_total ); movenpc strnpcinfo(0), .CoordinateX[.@r], .CoordinateY[.@r]; .current_rune = rand( .total_rune_type ); waitingroom " "+ .rune_name$[ .current_rune ], 0; end; OnInit: // Runes Duration in Seconds .duration = 5; // Random Coordinate where NPC will Shown Again setarray .CoordinateX, 128; setarray .CoordinateY, 163; .coordinate_total = getarraysize( .coordinatex ); setarray .rune_name$, "Double Damage", // 2 x ATK Rate "Invisibility", // Cloaking "Regeneration", // HP / SP Regeneration "Clone", // Create 2 Clones "Haste"; // Improve Movement Speed .total_rune_type = getarraysize( .rune_name$ ); goto OnStart; OncloakingUp: setoption 0x4, 0; end; } after totally look through this script, only I found this script is very unoptimized
-
Making this script more than one (like duplicate)
AnnieRuru replied to Seiro's question in Scripting Support
set another array, with settings 0,1,2think this is just a minor edit --> this is support section btw -
WOE - Last 2 Minutes Countdown Timer (Hot Request)
AnnieRuru replied to buda's question in Script Requests
last_map field shouldn't be used http://www.eathena.ws/board/index.php?s=&showtopic=177952&view=findpost&p=979067 actually ... Ryokem sometimes say something good, it just about his attitude ... http://rathena.org/board/topic/75469-qselect-random-player-in-map/#entry162586 his method is actually right I just using SQL way, and is more efficient than his method @donkeyg I think should be working ... ( by looking at it, I didn't test though ) PS: ... somehow I have a feeling that from now on, I should bring up using addrid script command method ? I against using this script command before because I thought ... user might use it wrongly to create abundant data ... or waste server resources ... but if I constantly teaching the correct method, perhaps 1 day might add into SVN -
Making this script more than one (like duplicate)
AnnieRuru replied to Seiro's question in Scripting Support
emistry's technique can be use if there's only 1 condition but there's 2 conditions here, so have to use array, but still using npc hidden name as index - script AutoSummon -1,{ end; OnTouch: .@n = atoi( strnpcinfo(2) ); if ( .summon_timetick[.@n] + .spawn_delay > gettimetick(2) || mobcount( "this", strnpcinfo(0)+"::Onaa" ) ) end; monster "this", .mob_spawn[ .@n *2 ], .mob_spawn[ .@n *2 +1 ], "--ja--", .mob_id[.@n], 1, strnpcinfo(0)+"::Onaa"; .summon_timetick[.@n] = gettimetick(2); sleep 60000; // 60 seconds auto-kill this mob killmonster strnpcinfo(4), strnpcinfo(0) +"::Onaa"; end; OnInit: if ( !getstrlen( strnpcinfo(2) ) ) end; // OnInit with duplicate npc will load multiple times .spawn_delay = 120; // a delay of 120 seconds setarray .mob_id, 1952, 1953, 1954; setarray .mob_spawn, 293,200, 155,181, 155,183; Onaa: // prevent server spam error end; } 1@cash,293,200,4 duplicate(AutoSummon) AutoSummon#0 100,3,3 prontera,155,181,4 duplicate(AutoSummon) AutoSummon#1 100,3,3 prontera,155,183,4 duplicate(AutoSummon) AutoSummon#2 100,3,3 a few things need to know about this duplicate with npc variable 1. npc variable is actually share between all duplicate npcs my mission board script uses atoi( strnpcinfo(2) ) to differentiated all npc in different ID 2. if you have 5 duplicated npc, OnInit label will execute 5 times so just need to load it once ... 3. since npc variable is share, and if want to make them unique to each one need to index them with array or getd command to make them do different stuffs .summon_timetick[.@n] <-- if not doing this, the variable will be overwritten by someone else trigger other duplicated npc and btw ... nice find of getting opening bracket is ignored by server when using duplicates =/ didn't know server will not read it ( I thought server spam error for it, but it actually works ) -
1st thing 1st change that sleep2 into sleep it is causing bugs http://rathena.org/board/topic/57784-dota-runes/page__st__40#entry143077 Case 5: sc_start SC_SpeedUp1,( .Duration * 1000 ),0; break; soundeffect "haste.wav", 0; your break; command should put after soundeffect
-
with dynamic menu prontera,156,181,5 script jfhdksfjhs 100,{ mes "select an item to buy"; next; .@s = select( .menu$ ) -1; if ( countitem( .itemuse ) < .sellcost[.@s] ) { mes "not enough "+ getitemname( .itemuse ); close; } delitem .itemuse, .sellcost[.@s]; getitem2 .sellitem[.@s], 1,1,10,0, 0,0,0,0; close; OnInit: setarray .sellitem, 1101, 1201, 1301; setarray .sellcost, 10, 20, 30; set .itemuse, 674; .@size = getarraysize( .sellitem ); for ( .@i = 0; .@i < .@size; .@i++ ) .menu$ = .menu$ + getitemname( .sellitem[.@i] )+" +10 [Cost -> "+ .sellcost[.@i] +"]:"; end; } with dynamic shop prontera,156,172,5 script market 100,{ dispbottom "You currently have "+ countitem(.itemuse) +" "+ getitemname(.itemuse); callshop "market2#hidden", 1; end; OnBuyItem: if ( !@bought_quantity ) end; .@size = getarraysize( @bought_nameid ); while ( .@i < .@size ) { .@j = 0; while ( @bought_nameid[.@i] != .itemid[.@j] && .@j < .shop_size ) .@j++; .@itemcost = .@itemcost + .itemcost[.@j] * @bought_quantity[.@i]; .@i++; } if ( .@itemcost > countitem(.itemuse) ) { mes "you don't have enough "+ getitemname(.itemuse); close; } delitem .itemuse, .@itemcost; for ( set .@i,0; .@i < .@size; set .@i, .@i +1 ) getitem @bought_nameid[.@i], @bought_quantity[.@i]; deletearray @bought_nameid; deletearray @bought_quantity; end; OnInit: setarray .itemid,1101,1201,1301,1501,1601; setarray .itemcost,10,20,30,40,50; set .itemuse, 674; .shop_size = getarraysize(.itemid); npcshopdelitem "market2#hidden", 512; for ( .@i = 0; .@i < .shop_size; .@i++ ) npcshopadditem "market2#hidden", .itemid[.@i], .itemcost[.@i]; npcshopattach "market2#hidden"; end; } - shop market2#hidden -1,512:10000 there are many many other ways to tackle this script ....
-
When death on map 1 times, How to config sent to savepoint.
AnnieRuru replied to mannices's question in Script Requests
- script kjhfksjdhfks -1,{ OnPCDieEvent: if ( strcharinfo(3) == "prontera" ) warp "Save", 0,0; end; } - script kjhfksjdhf2ks -1,{ OnPCLoadMapEvent: if ( strcharinfo(3) == "guild_vs1" ) @death_count = 0; end; OnPCDieEvent: if ( strcharinfo(3) == "guild_vs1" ) { @death_count++; if ( @death_count >= 2 ) warp "Save", 0,0; } end; } guild_vs1 mapflag loadevent- 1 reply
-
- 1
-
-
if I understand correctly, instancing in rathena is only meant for party use if a guild base need to be instance, with current rathena system needs the guild member to be in a party in order to create an instance map and it can create some unwanted situation ... however I play perfect world before and I actually understand that game can create instance for guild base ( which the instance_id is attach to guild ID instead of party ID ) perhaps your idea need some source modification ... just read instance.c ... found out might be possible to do it by source modification ...
-
https://rathena.svn.sourceforge.net/svnroot/rathena/trunk/npc/re/mobs/dungeons/lhz_dun.txt the moment I warped in, I got massacred
-
then post all the scripts that you can findand we might combine them up ?