Jump to content

NoWayHome

Members
  • Posts

    11
  • Joined

  • Last visited

Posts posted by NoWayHome

  1. On 4/6/2022 at 9:48 AM, Mahiro said:

    there are four variables that have not been set

      Reveal hidden contents

    function    script    specialbox    {
        setarray .i1[0],909,910; // Common Items
        set .i1rand,rand(0,1); // Randomize Common Items; just change max amount if you add items
        setarray .i2[0],911,912; // Rare Items
        set .i2rand,rand(0,1); // Randomize Rare Items; just change max amount if you add items
        setarray .i3[0],2199,1599; // Super Rare Items
        set .i3rand,rand(0,1); //Randomize Super Rare Items; just change max amount if you add items
        set .chance, rand(100);

            // Super Rare Item 1%
            if (.chance == 50){
            getitem .i3[.i3rand],1;
            announce "["+strcharinfo(0)+"] won a ["+getitemname(.i3[.i3rand])+"] from the Special Box.",0;
            end;
            } 

            // Rare Item 10%
            else if (.chance <= 2 && .chance >= 11){
            getitem .i2[.i2rand],1;
            announce "["+strcharinfo(0)+"] won a ["+getitemname(.i2[.i2rand])+"] from the Special Box.",0;
            end;
            } 

            // Common Items
            else {
            getitem .i1[.i1rand],1;
            end; }
    }

     

    Bro thanks for your reply! 
    It works fine!! very appreciate!

  2. Hi Guys,

    This Script was found on the rathena.

    I'm facing a problem on this script below:

    function	script	specialbox	{
    	setarray .i1[0],909,910; // Common Items
    	set .i1rand,rand(0,1); // Randomize Common Items; just change max amount if you add items
    	setarray .i2[0],911,912; // Rare Items
    	set .i2rand,rand(0,1); // Randomize Rare Items; just change max amount if you add items
    	setarray .i3[0],2199,1599; // Super Rare Items
    	set .i3rand,rand(0,1); //Randomize Super Rare Items; just change max amount if you add items
    	set .chance, rand(100);
    
    		// Super Rare Item 1%
    		if (.chance == 50){
    		getitem .i[.i3rand],1;
    		announce "["+strcharinfo(0)+"] won a ["+getitemname(.i[.i3rand])+"] from the Special Box.",0;
    		end;
    		} 
    
    		// Rare Item 10%
    		else if (.chance <= 2 && .chance >= 11){
    		getitem .i[.i2rand],1;
    		announce "["+strcharinfo(0)+"] won a ["+getitemname(.i[.i2rand])+"] from the Special Box.",0;
    		end;
    		} 
    
    		// Common Items
    		else {
    		getitem .i1[.i1rand],1;
    		end; }
    }
    50013,Special_Box,Special Present,2,10000,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc "specialbox",1; },{},{}

     

    When I was get the Super Rare items prize my name come out on the announcement in server BUT it shown like this :
    " [GameMaster] won a [null] from the Special Box. "

    And I don't even receive the prize after I opened the box with the announcement.
    May I know whats the problem?

    [Error]: buildin_getitem: Nonexistant item 0 requested.
    [Debug]: Source (NPC): FAKE_NPC (invisible/not on a map)

    This error found at the same time.


    Please guide me what to do. Thanks!

     

    P/S: If I post on the wrong section please move me to the correct one. Thank you!
     

  3. Hi @Emistry I have tried what u told me but it appear act/spr error when load the npc.

    //Checks if a given id is a valid npc id. [Skotlex]
    //Since new npcs are added all the time, the max valid value is the one before the first mob (Scorpion = 1001)
    #define npcdb_checkid(id) ( ( (id) > NPC_RANGE1_START && (id) < NPC_RANGE1_END ) || (id) == JT_HIDDEN_WARP_NPC || ( (id) > NPC_RANGE2_START && (id) < NPC_RANGE2_END ) || (id) == JT_INVISIBLE || ( (id) > NPC_RANGE3_START && (id) < NPC_RANGE3_END ) || ( (id) >= 30000 && (id) <= 31000))
  4. <?php
    if (!defined('FLUX_ROOT')) exit;
    
    if (empty($amount)) {
    	return false;
    }
    
    $session            = Flux::$sessionData;
    $customDataArray    = array('server_name' => $session->loginAthenaGroup->serverName, 'account_id' => $session->account->account_id);
    $customDataEscaped  = htmlspecialchars(base64_encode(serialize($customDataArray)));
    $businessEmail      = htmlspecialchars(Flux::config('PayPalBusinessEmail'));
    $donationCurrency   = htmlspecialchars(Flux::config('DonationCurrency'));
    $creditExchangeRate = Flux::config('CreditExchangeRate');
    $donationCredits    = floor($amount / $creditExchangeRate);
    $itemName           = htmlspecialchars(sprintf('Donation Credits: %s CREDIT(s)', number_format($donationCredits)));
    ?>
    <form action="https://<?php echo Flux::config('PayPalIpnUrl') ?>/cgi-bin/webscr" method="post">
    <input type="hidden" name="cmd" value="_donations" />
    <input type="hidden" name="notify_url" value="<?php echo $this->url('donate', 'notify', array('_host' => true)) ?>" />
    <input type="hidden" name="return" value="<?php echo $this->url('main', 'index', array('_host' => true)) ?>" />
    <input type="hidden" name="custom" value="<?php echo $customDataEscaped ?>" />
    <input type="hidden" name="business" value="<?php echo $businessEmail ?>" />
    <input type="hidden" name="item_name" value="<?php echo $itemName ?>" />
    <input type="hidden" name="amount" value="<?php echo (float)$amount ?>" />
    <input type="hidden" name="no_shipping" value="0" />
    <input type="hidden" name="no_note" value="1" />
    <input type="hidden" name="currency_code" value="<?php echo $donationCurrency ?>" />
    <input type="hidden" name="tax" value="0" />
    <input type="hidden" name="lc" value="US" />
    <input type="hidden" name="bn" value="PP-DonationsBF" />
    <p style="text-align: center"><input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif"
    	name="submit" alt="PayPal - The safer, easier way to pay online!" /></p>
    <img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1" />
    </form>

    Anyone can please  help me on changing this web function?

    Because it shown donation doesn't support in my country, I wish to change it to Buynow.

    I have done the link at paypal but don't how to change those code such as: 

    $session            = Flux::$sessionData;
    $customDataArray    = array('server_name' => $session->loginAthenaGroup->serverName, 'account_id' => $session->account->account_id);
    $customDataEscaped  = htmlspecialchars(base64_encode(serialize($customDataArray)));
    $businessEmail      = htmlspecialchars(Flux::config('PayPalBusinessEmail'));
    $donationCurrency   = htmlspecialchars(Flux::config('DonationCurrency'));
    $creditExchangeRate = Flux::config('CreditExchangeRate');
    $donationCredits    = floor($amount / $creditExchangeRate);
    $itemName           = htmlspecialchars(sprintf('Donation Credits: %s CREDIT(s)', number_format($donationCredits)));


    I have tried myself but failed, im new to this...

  5. 9 hours ago, kalabasa said:

    Im not expert to these but i think here your problem was on the npc file itself? it says 0 Bytes? meaning its an empty file thats why it wont load.

    Okay, I have uploaded the right act/spr files again, same problem appear =(

    Any Idea?

    [Error]: status_set_viewdata (NPC): No view data for class 30000t
    [Debug]: Source (NPC): Recruitment Board at vip_lounge (152,131)

     

  6. On 3/6/2022 at 4:51 PM, kalabasa said:

    i followed the guide from here/

    https://herc.ws/wiki/Custom_NPC

    after changing files from npc.hpp you need to recompile

     

    jobname.lub

     [jobtbl.JT_kakashi] = "kakashi",

     

    npcidentity.lub

    JT_kakashi = 10500,

     

    Npc.hpp

    JT_kakashi = 10500,

    find #define MAX_NPC_CLASS2_END NPC_RANGE3_END change to

    #define MAX_NPC_CLASS2_END 10900

     

    GRF Side

    data\sprite\npc\

    kakashi.act

    kakashi.spr

     

    finally on script side

    prontera,143,143,4    script    Kakashi    10500,{

    Hi @kalabasa thanks for your reply!
    But I still failed to load my custom npc sprite in the game.

    Can you help me check is there any problem with the steps I've done?
    Or maybe I did it wrongly please correct me! 
    Appreciate for help!



     

    sprite.png

    jobname.png

    npcidentity.png

    npchpp.png

    script.png

    putty.png

  7. Hi rAthena!

    I am facing problem on adding custom npc even thou I have follow all the guide that shown on all previous topic.

    After done adding the custom npc spr/act,
    I also edited jobname.lub and npcidentity.lub
    and yes I have also edited src/map/npc.hpp and script_constants.hpp

    After I recompile my server I still failed to load my new custom npc sprite.
    Can anyone please guide the correct way to add on my custom npc?

    P/S: this all were the guide I have done research. 

     sorry for my bad english.
    If i post on the wrong place please move my topic to the correct one, Thank You Very Much!!

  8. 6 hours ago, Racaae said:
    ID,AegisName,Name,Type,Buy,Sell,Weight,ATK[:MATK],DEF,Range,Slots,Job,Class,Gender,Loc,wLV,eLV[:maxLevel],Refineable,View,{ Script },{ OnEquip_Script },{ OnUnequip_Script }

    The effect goes on the Script area, not on the OnEquip_Script.

    Example:

    50000,LBRO,LBRO,4,0,,10,,0,,0,0xFFFFFFFF,63,2,1024,,0,1,5000,{ bonus bMaxHP,300; bonus bMaxSP,50; },{},{}

     

    I have also tried that, no effect on the costume headgear after wearing it. =(
    Any other solution?

  9. Hi good day!

    I faced a problem with adding effect on costume headgear. Even I have search for the solution  but still cannot solve the problem.
    Example:

    Quote

    50000,LBRO,LBRO,4,0,,10,,0,,0,0xFFFFFFFF,63,2,1024,,0,1,5000,{},{ bonus bMaxHP,300; bonus bMaxSP,50; },{}


    added the effect in the item_db.txt but the effect didn't show out after wearing the costume.

    is the any way to fix the problem?

    Thanks!

×
×
  • Create New...

Important Information

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