Jump to content

Takuyakii

Members
  • Posts

    215
  • Joined

  • Last visited

Everything posted by Takuyakii

  1. @Pride Line 26 Changed into this after that there's no error on map but when im talking to npc to summon the monster, i got this error buildin_getunitdata: Error in Argument! Please give a variable to store value in .@U_MAXHP = getunitdata (.@mid, UMOB_MAXHP); while (.@HP_Bar != 0) { .@U_HP = getunitdata (.@mid, UMOB_HP); .@P_HP = (.@U_HP*100)/.@U_MAXHP;
  2. Tested and put some ( ) under .@mid because of the error, then after that igot the same error buildin_getunitdata: Error in Argument! Please give a variable to store value in
  3. Good day! Can someone help me, to fix this error ? buildin_getunitdata: Error in Argument! Please give a variable to store value in Script: refer to this link: https://board.herc.ws/topic/15975-custom-unit-hp-bar-system/
  4. check sadder hunting mission
  5. Good day rA, can some one translate this into compatibility of rathena? 1. i want this to be a normal npc daily quest npc. 2. 24 hours cool down Thank you! Here's the code from herc //===== Hercules Script ==================================================================== // Automatic Trivia Event //===== Originally initiated By: =========================================================== // Capuche http://rathena.org/board/user/5984-capuche/ //===== Changed By: ======================================================================== // Habilis //===== Current Version: =================================================================== // 1.5 //===== Compatible With: =================================================================== // Hercules //===== Description: ======================================================================= //- Enhanced version of facts auto event. The Event is announced. The NPC asks 10 random //- questions from a question bank. Players have to write the answer to the main chat. //- Players don't need to worry about CAPITAL letters. //- 1) Question is asked by the NPC. //- 2) If there is no answer after 15 seconds NPC will give a hint. //- 3) IF there is still no answer after a hint, the question is skipped. //- 4) If the right answer is given, player is announced and reward is given //========================================================================================== //=====From eAthena to rAthena to Hercules================================================== //==========Without this original author, this script will never exist====================== //========Original author Credits=========================================================== //=====================================================DONT================================= // ToastOfDoom ================================================REMOVE======================= // RxChris =========================================================THIS================ // Hellflaem ================================================================CREDIT======= //========================================================================================== //========================================================================================== - script Trivia_Auto_Event FAKE_NPC ,{ OnMinute18: //OnEventStart: // Make the NPC appear so that players can begin to gather around // and perhaps read the rules enablenpc "Trivia#main"; .@nbAnnounce = 3; // How many times announce event with minute intervals while( .@nbAnnounce > 0 ) { announce "The Trivia Event will begin south of Prontera in " + .@nbAnnounce + " minute(s).",bc_all | bc_blue; .@nbAnnounce--; sleep 60000; } announce "The Trivia Event has begun!",bc_all | bc_blue; donpcevent "Trivia#main::OnEventBegin"; end; OnStop: OnEventTimeOut: disablenpc "Trivia#main"; end; OnInit: disablenpc "Trivia#main"; end; } prt_fild08,137,365,6 script Trivia#main 4_F_JOB_ASSASSIN,{ OnTalk: mes "[^0055FF ::: Trivia ::: ^000000]"; mes " "; mes "Very simple event!"; mes " "; mes "I will be asking random questions."; mes " "; mes "All you have to do is shout the answer in the main chat!"; mes " "; mes "Do not worry about the capital letters, I can recognize the right answer, when I see one ;)"; mes "Worry about the spelling though."; close2; end; function DefineQuestion; function GetQuestion; function GetAnswer; function GetHint; OnEventBegin: L_loop: do { .@i = rand(.numQuestions); // Randomly picks a fact. } while(.already_asked[.@i]); .already_asked[.@i] = true; if( !.count ) { npctalk "Please answer all my questions:"; sleep 2000; npctalk "If your answer is correct, you will obtain prizes!"; } .count++; sleep 4000; npctalk "[" + .count + "/" + .max_questions + "] " + GetQuestion(.@i); defpattern 1, "([^:]+):.*\\s" + GetAnswer( .@i ) + "(.*)", "Right"; .Ans$ = GetAnswer( .@i ); .Hint$ = GetHint( .@i );; activatepset 1; initnpctimer; end; OnTimer15000: npctalk "[Hint] : " + .Hint$; end; OnTimer30000: npctalk "Sorry, You took too long to answer."; callsub L_continue; end; Right: npctalk "Correct, " + strcharinfo(0) + "! The answer is " + .Ans$ + "."; // Winner gets reward in Zeny //Zeny += 1000000; // Alotta bax ;) // Winner gets reward in Item //getitem 607, rand( 1,10 ); // Randomly picks from 1 to 10 607 --Ygg berry~ . // Winner gets reward in Points .@pointsWon = rand(.minPoints,.maxPoints); #LROEVENTPOINTS = #LROEVENTPOINTS + .@pointsWon; dispbottom .ServerName$ + " : You won " + .@pointsWon + " event points."; L_continue: deletepset 1; stopnpctimer; if( .count < .max_questions ) { callsub L_loop; // loop 10 questions } .count = 0; // end of event .Q_session = 0; npctalk "That's all for now. Thanks for participating in this event ^^"; deletearray .already_asked, getarraysize(.already_asked); emotion e_thx; sleep 2000; disablenpc "Trivia#main"; end; function DefineQuestion { .@a = .numQuestions % 128; .@b = .numQuestions / 128; setd(".question_" + .@a + "$[" + .@b + "]", getarg(0)); setd(".answer_" + .@a + "$[" + .@b + "]", getarg(1)); setd(".hint_" + .@a + "$[" + .@b + "]", getarg(2)); .numQuestions = .numQuestions + 1; return; } function GetQuestion { return getd(".question_" + (getarg(0) % 128) + "$[" + (getarg(0) / 128) + "]"); } function GetAnswer { return getd(".answer_" + (getarg(0) % 128) + "$[" + (getarg(0) / 128) + "]"); } function GetHint { return getd(".hint_" + (getarg(0) % 128) + "$[" + (getarg(0) / 128) + "]"); } OnInit: .ServerName$ = "[Your boring server]"; .minPoints = 10; .maxPoints = 25; .max_questions = 10; // 10 questions if more than 10 questions are defined DefineQuestion("When you create a character in this game, how many primary stats are there?","6", "STR, AGI, VIT, INT, DEX, LUK"); DefineQuestion("Wizard skill Water Ball can only be cast over deluge or ____?", "water", "It is liquid."); DefineQuestion("Which item is required to create a guild?", "emperium", "An Emperial item"); DefineQuestion("which skill is beneficial to the living and damaging to the undead?", "heal", "It restores health."); DefineQuestion("In which town Thieves guild is located?", "morocc", "A town in the sorgat desert."); DefineQuestion("In which town Merchants guild is located?", "alberta", "It's a portuary town."); DefineQuestion("In which town Archers guild is located?", "payon", ""); DefineQuestion("What property do Izlude dungeon monsters possess?", "water", "It is liquid."); DefineQuestion("What status can be inflicted with the Hammer Fall skill?", "stun", "Did I see the stars around your head?"); DefineQuestion("How much Zeny one Jellopy is worth?", "3", "Just get it from a Poring."); DefineQuestion("Which town has the most Dancers?", "comodo", "An island in the warm waters."); DefineQuestion("How many different poring-like monsters you can meet near prontera, including mini bosses?", "9", "poring, drops, poporing, marin, santa poring, mastering, angeling, arcangeling, ghostring"); DefineQuestion("What property counters best the water property?", "wind", "It's Blowing"); DefineQuestion("What property counters best the undead property?", "holy", "Perhaps an acolyte or a priest can tell you?"); DefineQuestion("What kind of food both Vanilmirth and Christmas Goblin like?", "scel", "Yellow jeloppy"); DefineQuestion("How many cities are in Rune-Midgrad kingdom?", "11", "Prontera, Izlude, Jawaii, Geffen, Payon, Morocc, Alberta, Comodo, Umbala, Al De Baran, Lutie"); DefineQuestion("What city is the capital of Rune-Midgrad kingdom?", "prontera", "The most central town of all."); DefineQuestion("Which food is able to fully restore health and mana? _________ _____", "yggdrasil berry", "A berry growing on the most majestic tree!"); DefineQuestion("Which one of those is the fastest weapon type? Sword, Dagger, Staff, Mace", "dagger", "Something that has to do with the length of the blade."); DefineQuestion("Which one of those id the cheapest? Jellopy Large Jellopy Royal Jelly Honey", "jellopy", "Dropped by Porings."); DefineQuestion("Which monster drops a pet taming item to tame Deviruchi?", "joker", "Why so serious?"); if( .numQuestions < .max_questions ) .max_questions = .numQuestions; end; }
  6. Can someone re convert this into new or any compatibility because this is so old files. Please help me Thank you <?php if (!defined('FLUX_ROOT')) exit; $title = Flux::message('ServerStatusTitle'); $cache = FLUX_DATA_DIR.'/tmp/ServerStatus.cache'; if (file_exists($cache) && (time() - filemtime($cache)) < (Flux::config('ServerStatusCache') * 600)) { $serverStatus = unserialize(file_get_contents($cache)); } else { $serverStatus = array(); foreach (Flux::$loginAthenaGroupRegistry as $groupName => $loginAthenaGroup) { if (!array_key_exists($groupName, $serverStatus)) { $serverStatus[$groupName] = array(); } $loginServerUp = $loginAthenaGroup->loginServer->isUp(); foreach ($loginAthenaGroup->athenaServers as $athenaServer) { $serverName = $athenaServer->serverName; $sql = "SELECT COUNT(char_id) AS players_online FROM {$athenaServer->charMapDatabase}.char WHERE online > 0"; $sth = $loginAthenaGroup->connection->getStatement($sql); $sth->execute(); $res = $sth->fetch(); $serverStatus[$groupName][$serverName] = array( 'loginServerUp' => $loginServerUp, 'charServerUp' => $athenaServer->charServer->isUp(), 'mapServerUp' => $athenaServer->mapServer->isUp(), 'playersOnline' => intval($res ? $res->players_online : 0) ); } } $fp = fopen($cache, 'w'); if (is_resource($fp)) { fwrite($fp, serialize($serverStatus)); fclose($fp); } } $online = "<img src='".$this->themePath('img/online.png')."' alt=\"Online\"/>"; $offline = "<img src='".$this->themePath('img/offline.png')."' alt=\"Offline\"/>"; ?> <?php foreach ($serverStatus as $privServerName => $gameServers): ?> <?php foreach ($gameServers as $serverName => $gameServer): ?> <div style="width:100%; height:100%; margin:0 auto;"> <div class="online_count"> <table width="100%" border="0"> <tr> <td align="center"> <p style="font-size:35px; margin-top:0px; font-weight:normal; font-family:'Visitor TT2 BRK'" align="center"> <?php echo $gameServer['playersOnline'] ?> </p> </td> </tr> </table> </div> <div class="online_peak"> <table width="100%" border="0"> <tr> <td align="center"> <font style="font-size:12px; font-weight:normal; font-family:'Visitor TT2 BRK'; color:#00CCFF;"><?php include('highest_peak.php'); ?></font> </td> </tr> </table> </div> <div class="server_time"> <table width="100%" border="0"> <tr> <td align="center"> <font style="font-size:12px; font-weight:normal; font-family:'Visitor TT2 BRK'; color:#CCC;"><?php include('status_time.php'); ?></font> </td> </tr> </table> </div> <div style="position:absolute; margin-left:285px; height:40px; width:200px; border:none;"> <div class="char"><?php if ( $charserver[0] == $online ) { echo $online; } else { echo $offline; } ?></div> <div class="map"><?php if ( $mapserver[0] == $online ) { echo $online; } else { echo $offline; } ?></div> <div class="login"><?php if ( $loginserver[0] == $online ) { echo $online; } else { echo $offline; } ?></div> </div> </div> <?php endforeach ?> <?php endforeach ?>
  7. Solved. please close this threads thank you.
  8. Good day rA, can someone help me to fix this error about query? i already googled some and fix the other error but this error, i can't fix it MYSQLI_FETCH_ARRAY() EXPECT PARAMETER 1 to be MYSQLI_Result object given below is my code <?php if (!defined('FLUX_ROOT')) exit; ?> <?php //SQL Connection function Connection() { $db_host="127.0.0.1"; //insert the IP Address of your website $db_name="rathena"; //insert your database name insid the 2 double quotesS $username="zxc"; //insert the username of your phpmyadmin (SQL username) $password="zxc"; //insert the password of your phpmyadmin (SQL password) $conn = mysqli_connect($db_host,$username,$password); if (!$conn) { echo "Connection failed!"; return false; } mysqli_select_db($conn, $db_name); return $conn; } $conn = Connection(); if ($conn) { $hpsql = mysqli_query($conn, "SELECT * FROM cp_onlinepeak ORDER BY users DESC LIMIT 1"); $hprow = mysqli_fetch_array($conn,$hpsql); echo $hprow['users']; }
  9. can someone help me to show how this work? how to compile this item.
  10. can someone help me with this? thanks!
  11. mind to share your script so we can check?
  12. if(Zeny>Your max zeny{ mes "too much zeny"; } i guess
  13. Can someone help me to make this script have Jackpot prize? or chance to get the rare item? Thank you. - script Wheel_of_Fortune FAKE_NPC ,{ OnInit: disablenpc("Wheel of Fortune#Main"); .EventName$ = "[Wheel Of Fortune]"; end; OnClock0900: OnClock1600: OnClock2200: OnStart: .Start = true; announce(sprintf("%s : The event will begin in 1 minute, near the center of Prontera.", .EventName$), bc_blue | bc_all); initnpctimer(); end; OnTimer60000: // 1 min enablenpc("Wheel of Fortune#Main"); announce(sprintf("%s : Come to Prontera and test your luck", .EventName$), bc_yellow | bc_all); end; OnTimer60500: // 1 mins announce(sprintf("%s : One minute, do your last spin!", .EventName$), bc_yellow | bc_all); end; OnTimer120000: // 2 mins OnStop: .Start = false; stopnpctimer(); disablenpc("Wheel of Fortune#Main"); end; OnCommand: if (.@atcmd_numparameters != 1) { dispbottom(sprintf("Usage: %s <start/end>", .@atcmd_command$), 0x00FF00); dispbottom(sprintf("%s failed.", .@atcmd_command$), 0x00FF00); end; } if (.@atcmd_parameters$[0] == "start") { if (!.Start) donpcevent(sprintf("%s::OnStart", strnpcinfo(NPC_NAME))); else { dispbottom("The Wheel of Fortune has already started.", 0x00FF00); dispbottom(sprintf("%s failed.", .@atcmd_command$), 0x00FF00); } } else if (.@atcmd_parameters$[0] == "end") { if (.Start) donpcevent(sprintf("%s::OnEnd", strnpcinfo(NPC_NAME))); else { dispbottom("The Wheel of Fortune is not active.", 0x00FF00); dispbottom(sprintf("%s failed.", .@atcmd_command$), 0x00FF00); } } else { dispbottom(sprintf("Usage: %s <start/end>", .@atcmd_command$), 0x00FF00); dispbottom(sprintf("%s failed.", .@atcmd_command$), 0x00FF00); } end; } prontera,164,169,1 script Wheel of Fortune#Main 2_SLOT_MACHINE,{ OnTalk: if (Zeny < .Zeny_Cost && #freewheelfortunespin < 0) { mes("[^0055FFLucky Spin^000000]", .EventName$); mes("You are out of Zeny"); mes("and have no more"); mes("free spins. Come back"); mes("next time for more!"); close(); } .@mes$ = (#freewheelfortunespin > 0) ? sprintf(", but you, my friend, have %d free spin%s!", #freewheelfortunespin, (#freewheelfortunespin == 1) ? "" : "s") : "."; addtimer(1, sprintf("%s::OnEnd", strnpcinfo(NPC_NAME))); mes("[^0055FFLucky Spin^000000]", .EventName$); mes("Do you want to spin the wheel?"); mes("It costs ^FF000050.000 Zeny^000000 to play", .@mes$); next(); while (true) { if (Zeny < .Zeny_Cost && #freewheelfortunespin < 0) callsub(S_End); switch (select( (#freewheelfortunespin > 0) ? sprintf("Yes! Use free spin! (%d left)", #freewheelfortunespin) : "", (Zeny >= .Zeny_Cost ) ? sprintf("Yes! Use Zeny. (costs %dz)", .Zeny_Cost) : "", "No (Leave)" )) { // pay with free spin case 1: if (#freewheelfortunespin > 0) { if ((#freewheelfortunespin -= 1) < 0) #freewheelfortunespin = 0; callsub(S_Spin); } else callsub(S_End); break; // Pay with zeny case 2: if (Zeny >= .Zeny_Cost) { Zeny -= .Zeny_Cost; callsub(S_Spin); } else { cutin("aca_salim02", 2); mes("[^0055FFLucky Spin^000000]", .EventName$); mes("Awww, you don't have enough to gamble..."); mes(" "); mes("Have you ever heard?"); mes("'Money isn't all that matters' Got it?"); mes("Byeeeeeeeeeeeeee ;)"); callsub(S_End); } break; default: break; } callsub(S_End); } // Wheel spin animation S_Spin: .@Sector = rand(.Sector_Range[0], .Sector_Range[1]); .@Display = .@Sector * 2 - 1; .@Speed = .Spin_Speed; for (.@i = 0; .@i < .nbTurns; .@i++) { .@b = .Cutin_Range[0]; while (.@b <= .Cutin_Range[1]) { cutin(sprintf("%s%d", .Cutin$, .@b), 4); sleep2(.@Speed); .@b++; .@Speed += 1; // not ++, because you may want to adjust the stopping +1 +2 +3 } } .@b = .Cutin_Range[0]; while (.@b < .@Display) { cutin(sprintf("%s%d", .Cutin$, .@b), 4); sleep2(.@Speed); .@b++; } cutin(sprintf("%s%d", .Cutin$, .@b), 4); if (.Prize_ID[.@Sector] == -1) { // Free spin if (.Sound_Effects) soundeffect("wheel_jackpot.wav", 0); announce(sprintf("[%s] : Wow, %dx more Free spins!!!", .EventName$, .Prize_Qty[.@Sector]), bc_blue | bc_self); #freewheelfortunespin = #freewheelfortunespin == 0 ? .Prize_Qty[.@Sector] : #freewheelfortunespin + .Prize_Qty[.@Sector]; } else if (.Prize_ID[.@Sector] == 0) { // Nothing if (.Sound_Effects) soundeffect("wheel_lost.wav", 0); announce(sprintf("[%s] : Awwww, no luck in your gamble, more luck in love...", .EventName$), bc_blue | bc_self); } else { // Item if (.Sound_Effects) soundeffect("wheel_won.wav", 0); announce(sprintf("[%s] : %dx %s - enjoy your prize!", .EventName$, .Prize_Qty[.@Sector], getitemname(.Prize_ID[.@Sector])), bc_blue | bc_self); getitem(.Prize_ID[.@Sector], .Prize_Qty[.@Sector]); } sleep2(1000); if (Zeny < .Zeny_Cost && #freewheelfortunespin < 0) { mes("[^0055FFLucky Spin^000000]", .EventName$); mes("You are out of Zeny"); mes("and have no more"); mes("free spins. Come back"); mes("next time for more!"); close(); } return; S_End: close2(); OnEnd: cutin("", 255); end; OnInit: .EventName$ = "Wheel Of Fortune"; bindatcmd("wheel_of_fortune", "Wheel_of_Fortune::OnCommand", 98,false); .Spin_Speed = 50; // What is the base spin speed? (ms) .nbTurns = 2; // How many times the arrow makes a complete turn, before entering the stopping routine .Zeny_Cost = 50000; // How much zeny does it cost for a spin? .Sound_Effects = true; // Enable sound effects? (true/false) // You must have a total of 10 prizes. DO NOT remove 0 or -1 from the array and do not // change their order. setarray(.Prize_ID[1], -1, 7539, 14345, 7539, 617, 607, 7539, 604, 0, 12214); setarray(.Prize_Qty[1], 2, 3, 1, 1, 3, 3, 1, 3, 0, 1); // Don't touch below .Cutin$ = "WheelOfFortune_"; setarray(.Sector_Range, 1, 10); // Sector range setarray(.Cutin_Range, 0, 19); // Cutin range end; }
  14. what are you using? pre-re or RE? also check your map_cache.dat if that file exist.
  15. use WeemapCache and open your map_cache.dat, after that click FILE on weemapcache then select your izlude.gat, then save, after saving put your map_cache.dat to your trunk, then restart your server PS. DOn't forget to put the izlude file also in your grf.
  16. instead of @changesex use @changecharsex command, to fix this error go to your database and change the Gender of that character manually.
  17. // Copyright (c) rAthena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder #ifndef CONFIG_CUSTOM_DEFINES_PRE_HPP #define CONFIG_CUSTOM_DEFINES_PRE_HPP /** * rAthena configuration file (http://rathena.org) * For detailed guidance on these check http://rathena.org/wiki/SRC/config/ **/ #define PACKETVER 20151104 #endif /* CONFIG_CUSTOM_DEFINES_PRE_HPP */ i already did, then recompile but still failed to connect and im using the whole data of 20151104 the item , info etc i used this in my last server and it working but now it's not working
  18. Hello im using 2018 client now and i want it to downgrade for some reason i read some topic here about this and what i did is i changed packet.h into my 20151104 in defines_pre.hpp #define PACKETVER 20151104 when i'm trying to login there's no error on the server i can login but can't proceed to character. please help me
  19. can someone help me , im requesting for this script 1. NPC that will give item 2. the npc will only give to the selected account id. example 200004,20006,200030 and so on 3. and can only obtained once Thank you.
  20. Takuyakii

    Atcommand

    just replace the OnQuest: warp "your quest map",155,180; and so on
  21. Pabaliktad po kas ung script nyo po about dun sa % at dun sa pag ka sunod sunod po ng item dpat ung mga rare item is ung nandun sa setarray .@P1
×
×
  • Create New...