Jump to content

Genesis

Members
  • Posts

    19
  • Joined

  • Last visited

Posts posted by Genesis

  1. Hi,

     

    I currently have a NPC that sets a timer on a player like so:

     

    addtimer 7200000, "NPC::Tag";

    when they finish a particular quest. This timer serves as a way to stop them from doing the quest again for 2 hours.

    I am also using OnPCLoginEvent to reset the timer when they login. However, I'd like to make it so it doesn't add the timer again, but instead, continues the existing timer.

     

    I was thinking of setting a variable and having it decrease by 1 every second, and that variable being the "time left." However, I do not know how to implement this using the eA/rA scripting language. Any suggestions?

  2.  

    5 hours ago, cawogeek said:

    I did that already but is still have error. I have a fresh installed FluxCP on http://romanila.com/test and if you can see the nav menu collapse don't have any icon bars, means it doesnt reads glyphicons and same on HTML5. I tried change the div on the nav bar but whenever i change it to nav it doesnt recognize it anymore. Thanks :D

    Make sure in your header you have UTF-8 set. 

    5 hours ago, Rahul Dev said:

    You need to set the MySQL Encoding to UTF-8. I believe, you can enable that inside config/servers.php file by removing the // before Encoding and adding // before Convert. Like this

    Screenshot_2.jpg

    I had this issues in past and that is what i had tried to fix it. Try!!

    This fixed it for me, thanks!

    • Upvote 1
  3. Hello,

     

    With the following script:

    pvp_n_1-1,0,0,0,0       monster Poring  1002,90,0,0,"SpeedRoomChecker::OnKill";
     
     
    -       script  SpeedRoomChecker        -1,{
    OnKill:
            if (countitem(617) < 1) {
                    mes "You have 0 apples!";
                    warp "prontera",0,0;
            end;
            }
    end;
    }
    

    I am getting this error message:

    [Error]: npc_event: event not found [SpeedRoomChecker::OnKill";;]
    
    

    I'm not sure why, I have worked on similar scripts with minimal problems. I assume this issue is something rather silly I am missing. Any thoughts?

  4. Hello,

     

    I'm trying to create a slot machine NPC, where players pay a fee to play. They have a x chance of winning y zeny. Does anyone have a snippet of a script illustrating a zeny slot machine's formula for making sure the house always wins?

     

     

    As far as I can remember from my probability classes is the following formula:

     

    EV = Chance_of_winning * (winnings - bet) + (chance of winning * -bet)

     

    However, I'd like to be able to account for multiple instances of winning (not always the jackpot) but at the same time making sure the house always wins.

     

     

    TLDR: I nneed a snippet of a zeny slot machine that shows the formula used to make sure the house wins, while ensuring the player gets SOME zeny back. 

  5. Hey guys,

     

    I have into a bit of a problem with something I am coding and wanted some advice. I want to make it so when the party leader speaks to a NPC, the entire party is disguised. I was debating the best way to do this, I assume it would be to add all the members of the party to an array and using a for loop? Then clearing the array once they are disguised? Do you guys have any suggestions? Thanks!

  6. Hello all,

     

    I am trying to create a simple ranking NPC ingame that will rank players based on a variable, this variable is increased automatically once a player is killed, or does a specific quest. I know SQL is an option but I wanted to code it without it. I was originally thinking of adding the top 10 players to an array, but the thing that i can't figure out is how I would continuously update this top list. Do you guys have any suggestions or potentially, some sample scripts I can take a look at to based mine off of? Thanks!

  7. Hey guys,

    I'm running into a bit of a problem in FluxCP. I cannot figure out how to add items to the item shop. In access.php, I already granted permission under the purchase and itemshop arrays. I can see purchase, but I cannot see itemshop. I also enabled "AddShopItem" in the same php file, I still cannot see the itemshop directory. Thanks!

×
×
  • Create New...