Jump to content

AnnieRuru

Members
  • Posts

    2,044
  • Joined

  • Last visited

  • Days Won

    48

Community Answers

  1. AnnieRuru's post in Got debug in this script [Emistry Bomb_Poring_Event] was marked as the answer   
    you never say how to reproduce the problem
    so I just read the script
    well I spotted 1 error though

    [Info]: Character 'AnnieRuru' logged off. [Error]: script_rid2sd: fatal error ! player not attached! [Debug]: Function: getmapxy (4 parameters): [Debug]: Data: variable name='[email protected]$' index=0 [Debug]: Data: variable name='[email protected]' index=0 [Debug]: Data: variable name='[email protected]' index=0 [Debug]: Data: number value=0 [Debug]: Source (NPC): bombevent (invisible/not on a map)can be reproduce by using a GM99 and start the event, then immediately log offthe problem should be here

    StartEvent: // line 143 ... start the event initnpctimer; ..... OnTimer10000: // line 380 if(getmapusers("quiz_01") == 1){ killmonsterall "quiz_01"; mapannounce "quiz_01","You have survive and WIN, approach the Reward NPC please.",0; enablenpc "Reward NPC"; end; // <-----THIS ONE is inside the bracket } OnPCDieEvent: getmapxy [email protected]$,[email protected],[email protected],0;the end; should be outside the bracketand this script make extensive use of sleep2 command ... should be using sleep command to avoid some undesirable situation ...
    other than that explain more in detail
    EDIT:
    I also didn't see any OnPCLogoutEvent in this script ...
  2. AnnieRuru's post in Variables Question was marked as the answer   
    only by saving $var, permanent server variable over hundred-thousands (100,000) lines will harm server
    in fact, if you saving with player permanent variable, the server has already hard-coded a limit
    http://www.eathena.ws/board/index.php?showtopic=153708&hl=
    so the server will warn you about it when it reaches the limit
    once it reaches the limit, that variable isn't save into memory, and discarded,
    means the player can redo the quest again and again, always read the ( quest == 0 ) stuffs

    since the server has already hard-coded a limit, so its harmless
  3. AnnieRuru's post in pvp ladder ranking not working. was marked as the answer   
    try this one instead

    /* create table pvpladder ( cid int(11) primary key, name varchar(23), kills int(11), deaths int(11), class int(11), key (kills) ) engine = myisam; */ prontera,164,170,2 script PvP Ladder 786,{ [email protected] = query_sql( "select name, kills, deaths, class from pvpladder order by kills desc limit 10", [email protected]$, [email protected], [email protected], [email protected] ); if ( [email protected] ) { mes "ladder is empty"; close; } for ( [email protected] = 0; [email protected] < [email protected]; [email protected]++ ) mes "^0000FF"+ ([email protected]+1) +": ^228B22"+ [email protected]$[[email protected]] +" ^606060"+ jobname([email protected][[email protected]]) +" ^006699"+ [email protected][[email protected]] +" / ^C80000"+ [email protected][[email protected]] +"^000000"; close; OnPCKillEvent: query_sql "insert into pvpladder values ( "+ getcharid(0) +", '"+ escape_sql( strcharinfo(0) ) +"', 1, 0, "+ class +" ) on duplicate key update kills = kills +1, name = '"+ escape_sql( strcharinfo(0) ) +"', class = "+ class; attachrid killedrid; query_sql "insert into pvpladder values ( "+ getcharid(0) +", '"+ escape_sql( strcharinfo(0) ) +"', 0, 1, "+ class +" ) on duplicate key update deaths = deaths +1, name = '"+ escape_sql( strcharinfo(0) ) +"', class = "+ class; delwaitingroom; // continue read OnInit: if ( query_sql( "select name, kills, deaths, class from pvpladder order by kills desc limit 1", [email protected]$, [email protected], [email protected], [email protected] ) ) waitingroom [email protected]$ +" ("+ jobname([email protected]) +") : "+ [email protected] +" / "+ [email protected], 0; else waitingroom "PVP Ladder !", 0; end; }
    EDIT: fix a typo on table creation
  4. AnnieRuru's post in Disguise Event: is my recompling right? was marked as the answer   
    change

    defpattern 1,"([^:]+):.\\s*"+$MonsterName$+".*", "iCorrect"; into

    defpattern 1,"([^:]+):.\\s*"+$MonsterName$+".$", "iCorrect";
  5. AnnieRuru's post in Warping player(s) from a map after a set time was marked as the answer   
    you should know that @timeused is a temporary player variable, its only meant for testing
    if you want to do this on live server, use a permanent player variable
    alpha script, use timeused1, beta script use timeused2 ... separate the variable out from each npc

    this is how I do this

    // mvp room summoner - script Main_MVP_warper -1,{ [email protected] = atoi( strnpcinfo(2) ); mes "[ ^0065DF"+ strnpcinfo(1) +"^000000 ]"; mes "Would you like to enter Room "+ [email protected] +" ?"; next; if ( select ( "Yes", "No" ) == 2 ) { mes "Good bye then."; close; } if ( getd( "timeused"+ [email protected] ) + 180000 > gettimetick(2) ) { // 180,000 seconds delay (5 hours) mes "We are revitalizing Room "+ [email protected] +", come back later."; close; } if ( getmapusers( "bossnia_0"+ [email protected] ) ) { mes "Sorry, a player is in the room."; close; } warp "bossnia_0"+ [email protected], 180,71; deltimer strnpcinfo(0) +"::OnKick"; addtimer 600000, strnpcinfo(0) +"::OnKick"; // 600,000 seconds warp out (10 minutes) setd "timeused"+ [email protected], gettimetick(2); end; OnKick: if ( strcharinfo(3) == "bossnia_0"+ [email protected] ) warp "SavePoint", 0,0; end; } quiz_00,56,31,4 duplicate(Main_MVP_warper) Alpha MVP#1 770 quiz_00,58,31,4 duplicate(Main_MVP_warper) Beta MVP#2 773 quiz_00,60,31,4 duplicate(Main_MVP_warper) Theta MVP#3 774 quiz_00,62,31,4 duplicate(Main_MVP_warper) Epsilon MVP#4 776
  6. AnnieRuru's post in Regarding EXP. was marked as the answer   
    e_tower mapflag bexp 125 [email protected] mapflag bexp 125 [email protected] mapflag bexp 125 [email protected] mapflag bexp 125 [email protected] mapflag bexp 125 [email protected] mapflag bexp 125 [email protected] mapflag bexp 125
  7. AnnieRuru's post in random item was marked as the answer   
    prontera,155,180,5 script test item reward#2 100,{ [email protected] = rand( 17 + 33 + 50 ); // total 100 if ( [email protected] < 17 ) { // /17/100 ... about 1/6 * 100% getitem 503, 1; getitem 504, 1; announce "Poring Catcher : We have a winner, "+ strcharinfo(0) +". - won a prize3",0; } else if ( [email protected] < 33 ) { // 33/100 ... about 1/3 * 100% getitem 501, 1; announce "Poring Catcher : We have a winner, "+ strcharinfo(0) +". - won a prize2",0; } else { // the rest is 50/100, which is 1/2 * 100% getitem 502, 1; // Cool FB Hat announce "Poring Catcher : We have a winner, "+ strcharinfo(0) +". - won a prize1",0; } end; }
    if you want make it 100%, then make the variable total up to 100 ...
  8. AnnieRuru's post in moveable / placeable NPC is it possible ? was marked as the answer   
    the npc CAN move outside the map with unitwarp + getnpcid

    prontera,155,187,5 script dsasda 100,{ [email protected]$ = strnpcinfo(4); npctalk "I am currently in "+ [email protected]$; sleep 1000; if ( [email protected]$ == "prontera" ) unitwarp getnpcid(0), "morocc",156,93; else if ( [email protected]$ == "morocc" ) unitwarp getnpcid(0), "prontera", 156,191; end; }
    move to script support btw
  9. AnnieRuru's post in Help with atcommand in script was marked as the answer   
    prontera,152,187,5 script kjdhfkdsjfhks 100,{ atcommand "@kami a\"sdas\"fafs"; atcommand "@kami asdasfafs"; end; } use \ symbol to escape a string
  10. AnnieRuru's post in atcommand @storage was marked as the answer   
    trunk/npc/kafras/functions_kafras.txt
    use openstorage
  11. AnnieRuru's post in If compare to party..... was marked as the answer   
    prontera,155,181,5 script kjdfhskfhds 100,{ getpartymember getcharid(1), 0; for ( [email protected] = 0; [email protected] < [email protected]; [email protected]++ ) { if ( compare( [email protected]$[[email protected]], "ruru" ) ) { mes "sry, "+ [email protected]$[[email protected]] +" is not allow to enter"; close; } } mes "free to go"; close; }
  12. AnnieRuru's post in WoE Rank Script was marked as the answer   
    your script is not a stable script
    http://rathena.org/board/topic/75089-emperium-top5-breaker/#entry160694
    use this one
    woe_pvp_ladder_0.1.txt
  13. AnnieRuru's post in PvP Room was marked as the answer   
    prontera,150,187,5 script Arena 413,{
    switch( select( "2nd Class Arena [ "+getmapusers("pvp_y_1-2")+" Users ]",
    "3rd class Arena [ "+getmapusers("pvp_y_2-2")+" Users ]",
    "No Donation 2nd Job [ "+getmapusers("pvp_y_3-2")+" Users ]",
    "No Donation 3rd Job [ "+getmapusers("pvp_y_4-2")+" Users ]",
    "One on One [ "+getmapusers("pvp_y_5-2")+" Users ]",
    "Info" ) ) {
    case 1:
    if ( upper & 4 ){
    mes "You are not 2nd Class , so you cant enter.";
    }else{
    warp "pvp_y_1-2",0,0;
    announce ""+strcharinfo(0)+" Has Enter PvP 2nd Class Room !!",bc,0xBAB9B9;
    }
    break;
    case 2:
    if ( !( upper & 4 ) ){
    mes "You are not 3rd Class , so you cant enter.";
    }else{
    warp "pvp_y_2-2",0,0;
    announce ""+strcharinfo(0)+" Has Enter PvP 3rd Class Room !!",bc,0xBAB9B9;
    }
    break;
    case 3:
    if ( upper & 4 ){
    mes "You are not 2nd Job class , so you cant enter.";
    }else{
    for( set [email protected],0; [email protected]<getarraysize(.NoDonator_ids); set [email protected],[email protected]+1 )
    if (countitem(.NoDonator_ids[[email protected]])) {
    mes "You can not bring God items in this pvp.";
    close;
    }
    warp "pvp_y_3-2",0,0;
    announce ""+strcharinfo(0)+" Has Enter PvP No Donation 2nd Job Room !!",bc,0xBAB9B9;
    }
    break;
    case 4:
    if ( !( upper & 4 ) ){
    mes "You are not 3rd Class , so you cant enter.";
    }else{
    for( set [email protected],0; [email protected]<getarraysize(.NoDonator_ids); set [email protected],[email protected]+1 )
    if (countitem(.NoDonator_ids[[email protected]])) {
    mes "You can not bring God items in this pvp.";
    close;
    }
    warp "pvp_y_4-2",0,0;
    announce ""+strcharinfo(0)+" Has Enter PvP No Donation 3rd Class Room !!",bc,0xBAB9B9;
    }
    break;
    case 5:
    if ( getmapusers("pvp_y_5-2") > 1 ) {
    mes "please wait until 1 of them has fallen";
    } else {
    warp "pvp_y_5-2",0,0;
    announce ""+strcharinfo(0)+" Has Enter PvP One on One Room !!",bc,0xBAB9B9;
    }
    break;
    case 6:
    mes "The PvP Room is free for all wants to fight each other,";
    break;
    }
    close;
    OnInit:
    waitingroom "PvP Warper ",0;
    // items not allowed in Non Donator PVP
    setarray .NoDonator_ids[0], 2410, 1530, 2629, 2630, 16007, 31000, 31001, 31002, 31003;
    end;
    }
     
  14. AnnieRuru's post in R> quess the password. was marked as the answer   
    rofl ... me is sarcastic, I make scripts for rathena only
    hmm
    guess_password0.2.txt
    - add configuration for npc name that has to match npc name
    - fix a bug that if previous round has setup locations already, and re-host the game again, map-server throw error because of [email protected]$[[email protected]] should be .map$[[email protected]]
  15. AnnieRuru's post in Login Show name of the 'Towns' was marked as the answer   
    - script ldfjhsdlf -1,{ OnPCLoadMapEvent: while ( strcharinfo(3) != .town$[[email protected]] && [email protected] < 4 ) [email protected]++; if ( [email protected] == 4 || @town_map_cutin_loaded & 1 << [email protected] ) end; @town_map_cutin_loaded = @town_map_cutin_loaded | 1 << [email protected]; cutin .pic$[[email protected]], 4; sleep2 3000; cutin "", 255; end; OnInit: setarray .town$, "prontera", "morocc", "geffen", "payon"; setarray .pic$, "sign_01", "sign_02", "sign_03", "sign_04"; while ( [email protected] < 4 ) { setmapflag .town$[[email protected]], mf_loadevent; [email protected]++; } end; } I believe using OnPCLoadMapEvent is more correct method ...
    just do something like
    pc_setreg( sd, add_str("@town_map_cutin_loaded"), pc_readreg( sd, add_str("@town_map_cutin_loaded") ) | 1 << town ); I guess ... ?
    EDIT for below:
    XD ... I never make my script works outside rathena xD
  16. AnnieRuru's post in adding announcement and ladder to TCG Drainer was marked as the answer   
    prontera,155,181,5 script Lotti Girl 100,{ mes "[Lotti Girl]"; mes "It costs "+ .cost[1] +"x "+ getitemname( .cost[0] ) +" to play."; mes " "; for ( [email protected] = 0; [email protected] < 20; [email protected]++ ) mes $lotti_girl_ladder$[[email protected]]; if ( countitem( .cost[0] ) < .cost[1] ) close; next; if ( select( "Deal me in!", "No way..." ) == 2 ) close; mes "[Lotti Girl]"; while (1) { mes "Here we go..."; delitem .cost[0], .cost[1]; [email protected] = rand(.totalchance); [email protected] = 0; // <-- think you forgot to put this while ( ( [email protected] = [email protected] - getd( ".p"+ [email protected] +"[0]" ) ) >= 0 ) [email protected]++; [email protected] = getarraysize( getd(".p"+ [email protected] ) ); for ( [email protected] = 1; [email protected] < [email protected]; [email protected] += 2 ) getitem getd( ".p"+ [email protected] +"["+ [email protected] +"]" ), getd( ".p"+ [email protected] +"["+( [email protected] +1 )+"]" ); if ( getd( ".p"+ [email protected] +"[0]" ) < 50 ) // announce if below 50% chance announce "Congratulations to "+strcharinfo(0)+" for getting "+ .ann$[[email protected]] +"!", 0; if ( getd( ".p"+ [email protected] +"[0]" ) < 10 ) { // score the ladder if below 10% chance copyarray $lotti_girl_ladder$[1], $lotti_girl_ladder$[0], 19; $lotti_girl_ladder$ = strcharinfo(0) +" gains "+ .ann$[[email protected]] +" at "+ gettimestr( "%d/%m/%Y %H:%M %p", 21 ); } mes " "; mes "wanna try again ?"; next; if ( select( "Yes", "No" ) == 2 ) close; mes "[Lotti Girl]"; if ( countitem( .cost[0] ) < .cost[1] ) { mes "it seems you have ran out of "+ getitemname( .cost[0] ); close; } } close; OnInit: // setarray .p1, 70, 501,25; // debugging ... // setarray .p2, 70, 502,1; // setarray .p3, 40, 503,1; // setarray .p4, 40, 504,1; // setarray .p5, 40, 505,1; // setarray .p6, 50, 506,1, 507,1, 508,1, 509,1; // setarray .p7, 25, 512,1; // setarray .p8, 5, 513,1; setarray .p1, 70, 607,25; setarray .p2, 70, 13710,1; setarray .p3, 40, 5471,1; setarray .p4, 40, 5210,1; setarray .p5, 40, 5224,1; setarray .p6, 50, 2357,1, 2524,1, 2421,1, 2115,1; setarray .p7, 25, 2701,1; setarray .p8, 5, 2394,1; setarray .p9, 30+30+60+60+60+50+75+95, 12214,1; // default ... the chance are added up by 100-n% setarray .cost, 7227,300; .total = 9; freeloop 1; [email protected] = 1; while ( [email protected] <= .total ) { .totalchance = .totalchance + getd(".p"+ [email protected] ); [email protected] = 1; [email protected] = getarraysize( getd(".p"+ [email protected] ) ); while ( [email protected] < [email protected] ) { .ann$[[email protected]] = .ann$[[email protected]] + getd( ".p"+ [email protected] +"["+( [email protected] +1 )+"]" ) +"x "+ getitemname( getd( ".p"+ [email protected] +"["+ [email protected] +"]" ) ) +( ( [email protected] == [email protected] -2 )? "":"," ); // I think Euphy forgotten to make announcement when configuration has set more than 1 items [email protected] += 2; } [email protected]++; } freeloop 0; }
  17. AnnieRuru's post in remove buff from gospel when enter a map was marked as the answer   
    prontera,154,183,5 script asdas 100,{ while ( [email protected] <= 531 ) { if ( getstatus([email protected]) ) dispbottom [email protected] +" "+ getstatus([email protected]) +""; [email protected]++; } } tested a paladin cast gospel and another player in party to receive the buff
    I got this list

    30 // blessing 32 // increase agi 37 // holy weapon 38 // holy armor 187 // increase all stat 194 // increase hit 196 // increase flee 198 // max hp increase 199 // max sp increase 200 // attach strength 202 // increase def
    seems to match with data\skilldesctable2.txt

    Possible effects on allies: ^777777• 1-9999 HP heal • Remove all abnormal status (e.g. Curse, Blind and Poison) • Blessing LV 10 or Increase Agility LV 10 • Enchant Weapon or Armor with Holy property • Maximum HP or SP +100% • +20 to all stats • DEF +25% • MaxATK +100% • Flee Rate/HIT +50 ^000000 • Immunity against status ailments
    that immunity against status ailments, in my test server it says
    "All abnormal status effect has been removed"

    EDIT:
    wait, I got this • Immunity against status ailments ... checking which number it is now
    EDIT2:
    got it

    214 // SC_SCRESIST

  18. AnnieRuru's post in help error pvp ladder was marked as the answer   
    let me google for you
    click the 2nd link
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.