Jump to content

AnnieRuru

Members
  • Posts

    2044
  • Joined

  • Last visited

  • Days Won

    51

Everything posted by AnnieRuru

  1. German I remember at one time the German script support has even better standard than english script support lol ( at that time ) http://www.eathena.w...howtopic=238540 http://www.eathena.w...howtopic=183252 <-- especially this one after Faeroth post that topic, I saw scare the hell out of me at that timenah ... some off-topic but those times are really ... these german people pro than us ... I just used google translation on that script, german -> english gives the best translation
  2. that's new to me, whats the things that make his script broken ?which label ?
  3. I remember I got killed by pressure and tarot card of fate using that bonus http://www.eathena.ws/board/index.php?showtopic=183709 http://www.eathena.ws/board/index.php?showtopic=238332 http://www.eathena.ws/board/index.php?showtopic=273493 the only way is to pump your hp high and have high hp regeneration ...
  4. AnnieRuru

    Cluckers

    OnTimer40000: announce "GO! Click the chicken to get the prize!",bc_blue; if (!$cluck_item_id) set $cluck_item_id,512; if (!$cluck_item_amount) set $cluck_item_amount,1; set .startcluck,1; end; change into OnTimer40000: announce "GO! Click the chicken to get the prize!",bc_blue; if (!$cluck_item_id) set $cluck_item_id,512; if (!$cluck_item_amount) set $cluck_item_amount,1; set .startcluck,1; end; OnMinute00: // add this at the end of the script if (gettime(3)%2 || .startcluck) end; announce "[Cluck! Cluck! Boom!] is about to start in Prontera!",bc_blue; initnpctimer; end; just like Euphy did
  5. AnnieRuru

    Tax Script

    yeah actually I also don't understand him but I can think of 2 possible scenario scenario 1 player A rent a npc A for 1 month ( of course the item sells are unique ) everyone can buy the items selling from npc A after 1 month, npc A will send a mail, of total 10% TAX from all the transaction of the past 1 month ( use dynamic shop script, every time a player ... OnBuyItem: $tax_system[ atoi(strnpcinfo(2) ] += sum( getiteminfo( @bought_nameid, 1 ) * @bought_quantity ) at the end of the month, *sendmail to $tax_system_owner[ atoi(strnpcinfo(2) ]; ) scenario 2 a guild owns prontera castle A prontera castle A has a special npc B that sells unique items everyone can buy unique items selling from special npc B everytime a new woe start, the system will automatically *sendmail to the guild master owning that castle of all the 10% total transaction between the OnAgitstart ( ... well no need to explain much ... OnAgitStart: sendmail ... getguildmasterid ... ) EDIT: yeah, GmOcean say something similar to my scenario 1
  6. AnnieRuru

    Cluckers

    wow ! using atcommand in script should be avoided it creates unnecessary log inside log.atcommandlog I knew this script from eathena script release section that's why I didn't comment on that but if putting this into SVN .... should avoid using this kind of method isn't it ? http://www.eathena.ws/board/index.php?s=&showtopic=276907&view=findpost&p=1521218 atcommand "@nuke "+strcharinfo(0); change that into unitskilluseid getcharid(3), 173, 1; @jigsgfx, OnHour00: OnHour02: OnHour04: .... OnHour22: -- OR -- OnMinute00: if ( gettime(3) % 2 == 1 ) end;
  7. AnnieRuru

    Tax Script

    player B put item ID 501 into a Dynamic Shop, set the cost at 35 mithril coins player A buy the item ID 501 from Dynamic Shop with 35 mithril coins, player B earns 38 mithril coins ... like this ? seems like my theory is wrong btw, I believe this script seriously needed a *writemail script command, to send a transaction item by mailing to the seller ...
  8. http://rathena.org/b...ay/#entry149250 SQL abuse prontera,156,184,5 script kjdsfksdfj 100,{ .@nb = query_sql("select distinct left( name_japanese, 1 ) as aaa from item_db where type = 6 union select distinct left( name_japanese, 1 ) from item_db2 where type = 6 order by aaa", .@list$ ); for ( .@i = 0; .@i < .@nb; .@i++ ) .@menu$ = .@menu$ + .@list$[.@i] +":"; .@alphabet$ = .@list$[ select( .@menu$ ) -1 ]; .@menu$ = ""; .@nb = query_sql("select id, name_japanese from item_db where type = 6 and left( name_japanese, 1 ) = '"+ .@alphabet$ +"' and name_japanese not like '%+%' union select id, name_japanese from item_db2 where type = 6 and left( name_japanese, 1 ) = '"+ .@alphabet$ +"' and name_japanese not like '%+%' order by name_japanese limit 128", .@id, .@name$ ); for ( .@i = 0; .@i < .@nb; .@i++ ) .@menu$ = .@menu$ + .@name$[.@i] +":"; .@select = select( .@menu$ ) -1; getitem .@id[ .@select ], 1; close; } EDIT: tomorow I'll try do with dynamic shop ... so it will look just like in-game shop
  9. http://www.eathena.w...dpost&p=1300658 move to database request
  10. itemlist_eq.txt well ... mostly copy-pasted ... nothing special if you want to show the exact name of the item I made getitemname2 function
  11. I don't understand what you want ... which part is exactly you want part of my script to be taken out ? that script has a lot of counter-measure to print out the names exactly like a client does if you are talking about just showing the equipments, after input the names, select 'Equipped Items'
  12. @Emistry, your input .@Name$,4,23; that day you laugh at me, today let me laugh at you
  13. I don't think that's the correct answer so, set .@nb, query_sql ".....", .@name$; and then do a for-loop with -> .@name$[.@i]
  14. this is the answershut down your server and apply this SQL script delete from global_reg_value where str = 'etower_timer'; delete from global_reg_value where str = 'party_instance_id'; delete from quest where quest_id = 60200; delete from quest where quest_id = 60201;
  15. @Ryokem I think this guy come from some company ... that SQL table and the website is really professionally design @_@ he is learning how to make rathena script language that's why he is asking here anyway if you think a script is not working can always use *Debugmes script command and this is how I debug your script //--- Check credit card every 10 second OnTimer10000: debugmes "asdf"; // <-- I added this line to see your timer is running or not query_sql "select id,account_id,refill_amount from cutrue where refill='NO' and refill_amount>0",.id,.account_id,.refill_amount; sleep2 500; so the fix is setnpctimer 0; startnpctimer; end; OnInit: initnpctimer; startnpctimer; end; change into initnpctimer; end; OnInit: initnpctimer; end; EDIT: the reason is because if you want to change a npc timer, you have to stop the npc timer 1st like stopnpctimer; setnpctimer 5000; // you can set the timer freely to any value startnpctimer; but since you only wants to repeat itself every 10 seconds initnpctimer; <-- did the job itself
  16. my map-server throw lots of errors with your script [Warning]: npc_parsename: Name 'Obsc#Colored Feather Beret' is too long (len=26) in file 'npc/zzz.txt', line'1'. Truncating to 24 characters. [Warning]: npc_parsename: Name 'Obsc#Colored Baphomet Horns' is too long (len=27) in file 'npc/zzz.txt', line'2'. Truncating to 24 characters. [Warning]: npc_parsename: Name 'Obsc#Colored Dark Fairy Wings' is too long (len=29) in file 'npc/zzz.txt', line'4'. Truncating to 24 characters. of course option no.3 works because that's the only npc below 24 characters the rest are all more than 24 characters
  17. prontera,148,191,5 script test_walk 100,{ end; OnInit: getmapxy .@map$, .@x, .@y, 1; callfunc "npcwalk", 100, // npc speed .@x, .@y, // starting point 148, 183, // 1st waypoint 156, 187, // 2nd waypoint 156, 179, // 3rd waypoint 164, 191, // 4th waypoint 164, 183; // 5th waypoint } function script npcwalk { npcspeed getarg(0); .@cnt = ( getargcount() -1 ) -2; while (1) { for ( .@i = 0; .@i < .@cnt; .@i += 2 ) { // announce ( .@i /2 ) +". I'm going to walk to ("+( .@i +3 )+")"+ getarg( .@i +3 ) +" ("+( .@i +4 )+")"+ getarg( .@i +4 ) +"["+ distance( getarg( .@i +1 ), getarg( .@i +2 ), getarg( .@i +3 ), getarg( .@i +4 ) ) * getarg(0) +"]", 0; npcwalkto getarg( .@i +3 ), getarg( .@i +4 ); // sleep distance( getarg( .@i +1 ), getarg( .@i +2 ), getarg( .@i +3 ), getarg( .@i +4 ) ) * getarg(0); sleep callfunc( "radius_distance", getarg( .@i +1 ), getarg( .@i +2 ), getarg( .@i +3 ), getarg( .@i +4 ) ) * getarg(0); } // announce ( .@i /2 ) +". I'm going to walk to (1)"+ getarg(1) +" (2)"+ getarg(2) +"["+ distance( getarg(1), getarg(2), getarg( getargcount() -2 ), getarg( getargcount() -1 ) ) * getarg(0) +"]", 0; npcwalkto getarg(1), getarg(2); // sleep distance( getarg(1), getarg(2), getarg( getargcount() -2 ), getarg( getargcount() -1 ) ) * getarg(0); sleep callfunc( "radius_distance", getarg(1), getarg(2), getarg( getargcount() -2 ), getarg( getargcount() -1 ) ) * getarg(0); } } function script radius_distance { .@x = callfunc( "F_abs", getarg(0)-getarg(2) ); .@y = callfunc( "F_abs", getarg(1)-getarg(3) ); .@min = ( .@x < .@y )? .@x : .@y; .@max = ( .@x > .@y )? .@x : .@y; if ( !.@min ) return .@max; return ( ( ( .@max << 8 ) + ( .@max << 3 ) - ( .@max << 4 ) - ( .@max << 1 ) + ( .@min << 7 ) - ( .@min << 5 ) + ( .@min << 3 ) - ( .@min << 1 ) ) >> 8 ); } function script F_abs { return sqrt( pow( getarg(0), 2 ) ); } I just found out using *distance script command is not the correct way to calculate this because it can only return the max distance of x2-x1 or y2-y1 coordinate it can only calculate correct value if it is in perfect horizontal or vertical, but not diagonal so I think ... has to stick back to radius_distance again credit to keyworld
  18. AnnieRuru

    Bossnia

    erm ... lol that script is now looks more like a joke XD its useless to gives the reward out immediately, like this prontera,156,185,5 script kdjshfksdjf 100,{ if ( getcharid(1) == 0 ) end; warpparty "guild_vs2", 49,49, getcharid(1); addtimer 10000, strnpcinfo(0)+"::Ontimeup"; end; Ontimeup: announce strcharinfo(1) +" survive for 10 seconds !!", 0; warpparty "SavePoint", 0,0, getcharid(1); getpartymember getcharid(1), 1; getpartymember getcharid(1), 2; for ( .@i = 0; .@i < $@partymembercount; .@i++ ) if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) getitem 501, 1, $@partymemberaid[.@i]; end; OnPCLogoutEvent: OnPCDieEvent: if ( getcharid(1) == 0 ) warp "Save", 0,0; else warpparty "SavePoint", 0,0, getcharid(1); end; } don't forget all the mapflags especially the nosave SavePoint ones @Emistry yes, addtimer command will disappear if 1 of the party member log out but isn't on the 1st post it says, if any one of the party member log out, that party is fail ? EDIT: hmm he just said diesbut if logout is counted, this method is possible ( this is one of the level1 event script technique ) EDIT2: if you want to make things complicated allow die = whole team warp out, but log out still allow to remain until 1 person then need to use level2 event script technique ( party system ) wait me write out the technique ( though I think you already familiar the system ) EDIT3: here it is ... a level2 event script technique if you want to use this prontera,156,185,5 script kdjshfksdjf 100,{ if ( getcharid(1) == 0 ) end; warpparty "guild_vs2", 49,49, getcharid(1); .@party_id = getcharid(1); getpartymember .@party_id, 1; getpartymember .@party_id, 2; for ( .@i = 0; .@i < $@partymembercount; .@i++ ) { if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) { setd ".bossnia_pid_"+ .@party_id +"["+ .@c +"]", $@partymemberaid[.@i]; // simulate a new party array using setd/getd - a very typical level2 event script technique .@c++; } } sleep 10000; // use sleep command to attach timer to the party, there's no other way if ( getarraysize( getd( ".bossnia_pid_"+ .@party_id ) ) == 0 ) end; // when all party member down, it ends itself announce getpartyname( .@party_id ) +" survive for 10 seconds !!", 0; getpartymember .@party_id, 1; getpartymember .@party_id, 2; for ( .@i = 0; .@i < $@partymembercount; .@i++ ) { if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) { attachrid $@partymemberaid[.@i]; if ( strcharinfo(3) == "guild_vs2" ) { getitem 501, 1; warp "Save", 0,0; } } } deletearray getd( ".bossnia_pid_"+ .@party_id ); end; OnPCDieEvent: if ( getcharid(1) == 0 ) warp "Save", 0,0; else warpparty "SavePoint", 0,0, getcharid(1); deletearray getd( ".bossnia_pid_"+ getcharid(1) ); end; OnPCLogoutEvent: if ( strcharinfo(3) != "guild_vs2" ) end; // ok I originally don wan to do this if ( getcharid(1) ) { .@size = getarraysize( getd( ".bossnia_pid_"+ getcharid(1) ) ); for ( .@i = 0; .@i < .@size; .@i++ ) { if ( getd( ".bossnia_pid_"+ getcharid(1) +"["+ .@i +"]" ) == getcharid(3) ) { deletearray getd( ".bossnia_pid_"+ getcharid(1) +"["+ .@i +"]" ), 1; .@size--; if ( .@size ) announce strcharinfo(0) +" from "+ strcharinfo(1) +" has log out ! "+ .@size +" members left", 1; else announce "all team members from "+ strcharinfo(1) +" has log out !", 1; end; } } } end; } guild_vs2 mapflag nosave SavePoint // this mapflag itself prevent them staying in the map with logout its fine if you just want to learn this for fun ( well you seems to be asking for this ) though I still recommend level1 event script technique can already do the trick no need to complicate yourself with this
  19. btw, to really make it a daily variable should use gettimestr("%Y%m%d", 9) instead of gettime(5) http://www.eathena.ws/board/index.php?s=&showtopic=243105&view=findpost&p=1325171 what happens if the user can only online once per week , or once per month =/ prontera,156,186,4 script Premium Account::premiummap 422,{ // if( isPremium() == 0 ) goto NotPremium; // just testing mes "[Gatekeeper]"; mes "Where do you want to go?"; switch(select("Private Drop Event")) { case 1: if( atoi( gettimestr("%Y%m%d", 9) ) == #Daily ) { mes "You can only enter once a day"; close; } #Daily = atoi( gettimestr("%Y%m%d", 9) ); // addtimer 5000,strnpcinfo(3)+"::OnTimeLimit"; addtimer 300000,strnpcinfo(3)+"::OnTimeLimit"; warp "new_zone04",60,179; close; } OnTimeLimit: message strcharinfo(0),"Time's Up."; sleep2 3000; warp "SavePoint",0,0; end; NotPremium: mes "[Gatekeeper]"; mes "You are not a Premium Account Holder!"; close; OnInit: while (1) { if ( getmapusers("new_zone04") ) { while ( checkcell( "new_zone04", set( .@x, rand(48,168) ), set( .@y, rand(71,191) ), cell_chknopass ) ); makeitem 501, 1, "new_zone04", .@x, .@y; } sleep 500; } end; // doesn't read } new_zone04 mapflag noskill new_zone04 mapflag nowarp new_zone04 mapflag nowarpto new_zone04 mapflag noreturn new_zone04 mapflag nobranch new_zone04 mapflag nosave SavePoint // make sure you have this <.< ... addtimer timer will lost if player log out new_zone04 mapflag nomemo
  20. @goddameit no offense to you, but I just don't like the way you used initnpctimer; OnTimer1: ... <-- so ugly I'm quite sure this will take a lot of server resources for doing like this I just written a script out that using your method and mine you can try to compare which method is more efficient prontera,150,187,5 script test_walk#1 100,{ end; OnInit: // callfunc "npcwalk_annie", callfunc "npcwalk_goddameit", 400, // npc speed 150, 152, 187, 185; // x1, x2, y1, y2 } prontera,157,187,5 script test_walk#2 100,{ end; OnInit: // callfunc "npcwalk_annie", callfunc "npcwalk_goddameit", 400, // npc speed 157, 159, 187, 185; // x1, x2, y1, y2 } function script npcwalk_annie { npcspeed getarg(0); while (1) { npcwalkto getarg(2), getarg(3); sleep distance( getarg(1), getarg(3), getarg(2), getarg(3) ) * getarg(0); npcwalkto getarg(2), getarg(4); sleep distance( getarg(2), getarg(3), getarg(2), getarg(4) ) * getarg(0); npcwalkto getarg(1), getarg(4); sleep distance( getarg(2), getarg(4), getarg(1), getarg(4) ) * getarg(0); npcwalkto getarg(1), getarg(3); sleep distance( getarg(1), getarg(4), getarg(1), getarg(3) ) * getarg(0); } } function script npcwalk_goddameit { npcspeed getarg(0); while (1) { npcwalkto getarg(2), getarg(3); while ( !getmapxy( .@map$, .@x, .@y, 1 ) ) { if ( .@x == getarg(2) && .@y == getarg(3) ) break; sleep 1; } npcwalkto getarg(2), getarg(4); while ( !getmapxy( .@map$, .@x, .@y, 1 ) ) { if ( .@x == getarg(2) && .@y == getarg(4) ) break; sleep 1; } npcwalkto getarg(1), getarg(4); while ( !getmapxy( .@map$, .@x, .@y, 1 ) ) { if ( .@x == getarg(1) && .@y == getarg(4) ) break; sleep 1; } npcwalkto getarg(1), getarg(3); while ( !getmapxy( .@map$, .@x, .@y, 1 ) ) { if ( .@x == getarg(1) && .@y == getarg(3) ) break; sleep 1; } } } EDIT: ok I think I got your idea wrong because your script is use to check a player has reach a destination point or not which, my method cannot be implement in your script but this topic is talking about monster walking so ... its kinda different btw I can speak chinese, if you can't express your idea in English language I can translate for you no google translation pls though I think you already know that I'm a chinese, using simplify chinese letters @GmOcean bwahahaha ... of course I know xD at that time, I voted for 'Yes' when ultramage suggested to throw out mob_controller system from SVN terces and Yhn voted for 'no', though but in the end it was still threw out and dump inside source modification release well, no because I had been scripting moderator since 2007, and at the time, NOBODY release a mob controller script using mob controlling script commands although I learned it, but I also didn't release any in script release section ( well I still got some of the old post scatter in support/request if you search 'setmobdata' filter by my name ) but mob controller system is really a custom feature and only very very few people using it I'm kinda sure the dota script that is spreading around in this forum, definitely using a modified mob controller script commands
  21. after I try out the coordinate in-game only I understand what you are trying to do ... nope, you can't make a monster to walk that far, that is not within Line-Of-Sight you have to guide them through way points also, this is not possible with current script engine, I think this will need mob_controller system ( yes !! been 2 years since I last wrote a mob controller script ) the script should looks something like this turbo_n_1,337,275,5 script team 1 100,{ getmapxy .@map$, .@x, .@y, 0; setd ".@mob"+ .@i++, mobspawn( "Poring", 1002, .@map$, .@x, .@y ); setmobdata getd(".@mob"+ .@i), 26, 0; // prevent random walk unitwalk getd(".@mob"+ .@i), 343,275; // guide them to 1st waypoint sleep distance( .@x, .@y, 343,275 ) * 400; // let it walk to 1st waypoint unitwalk getd(".@mob"+ .@i), 342,258; // guide them to 2nd waypoint sleep distance( 343,275, 342,285 ) * 400; // let it walk to 2nd waypoint // .... repeat until the last waypoint end; } 1st guide them to the 1st waypoint that is within line of sight, defaulted to 14 under "area_size" inside \conf\battle, means don't let it walk the distance over 14 cells after that put sleep to let them walk slowly to their destination the time to calculate is determine from the Speed field from mob_db table for poring, it is set to 400 means, it takes 400 mili-seconds to walk 1 cell scorpion is 200, means 200 mili-seconds to walk 1 cell in other words, poring in 2 seconds can walk 5 cells, and scorpion can walk 10 cells in 2 seconds hence the script looks like that repeat the process guide the poring from waypoint to waypoint until reach the final destination, and you can use unitkill getd(".@mob"+ .@i); after it reach final destination PS: btw, I think I'm the only member left that know how to write mob controller scripts
  22. nope, we don't have this kind of database edit however your source modification is not that hard to do assign a variable inside pc.h to deny it for several seconds from being equip after attacking is something that I did similarly with deny the main-chat http://www.eathena.ws/board/index.php?showtopic=270470
  23. prontera,155,186,5 script dksjfskdfj 100,{ warp "guild_vs2", 49,49; if ( getmapusers("guild_vs2") == 0 ) atcommand "@cleanmap"; end; OnInit: while (1) { if ( getmapusers("guild_vs2") ) { while ( checkcell( "guild_vs2", set( .@x, rand(0,250) ), set( .@y, rand(0,250) ), cell_chknopass ) ); makeitem 501, 1, "guild_vs2", .@x, .@y; } sleep 100; } end; // MAKE THIS A HABIT !!! I know it doesn't reach here ... but when you read script, your mind will think differently } like this ? actually your method is already correct ... though, I don't see why your script doesn't work
×
×
  • Create New...