Welcome to AC Web.
Results 1 to 10 of 10
  1. #1

    npc change_rates 335


    REGISTER! (FREE)
    Registered members see less ads
    and also gain access to other great features.
    Good morning people
    I'm looking for a C++ or lua scrip
    for my server 335
    i want a change_rates npc
    from x1 to x10
    let the player play that npc
    and give him the option to change the rate to his liking.
    I hope for help, greetings

  2. #2
    require("xprates")
    local npcid = 90000

    local function Gossiper_OnGossipTalk(event, player, creature)
    local rateInfo = player:GetXPRateInfo();

    -- Add gossip options from 1 to players' max rate, increment by 1
    for i = 1, rateInfo[2] do
    player:GossipMenuAddItem(0, "Change XP rate to "..i..".", 0, i) -- Use intid as the amount of XP for the player
    end

    player:GossipMenuAddItem(0, "Nevermind.", 0, 0)
    player:GossipSendMenu(1, creature)
    end

    local function Gossiper_OnGossipSelect(event, player, creature, sender, intid, code)
    if(intid > 0) then
    player:SetXPRate(intid)
    player:SendBroadcastMessage("Your XP rate has now been set to "..intid.."!")
    end

    player:GossipComplete()
    end

    RegisterCreatureGossipEvent(npcid, 1, Gossiper_OnGossipTalk)
    RegisterCreatureGossipEvent(npcid, 2, Gossiper_OnGossipSelect)
    https://github.com/Foereaper/PublicS...es/xprates.lua

    - - - Updated - - -

    Btw this is eluna

  3. #3
    Quote Originally Posted by brunolopes View Post
    https://github.com/Foereaper/PublicS...es/xprates.lua

    - - - Updated - - -

    Btw this is eluna
    I will look into it, thank you very much for your response.

  4. #4
    All good enjoy any question or changes you need regarding the script you can post here and I will edit it for you (dont Pm me, post here so everyone who needs it can have it changed)

  5. #5
    Does it have to be an npc?
    I made a script that adds commands ".xp 1" to 10 to change rate and ".xp ?" to check set rate.

    But with these eluna scripts that change rates what happens is when a player gets xp the script intercepts the amount then multiplies it.

    So if the Worldserver.conf has things like Rate.XP.Kill, Rate.XP.Quest, and Rate.XP.Explore set to anything other than 1 it's going to multiply that xp when the player gets it... for example if servers Rate.XP.Kill is 10 and the player chooses .xp 10 then when the player kills something and gets the x10 xp the script multiples it by 10 which would be like setting Rate.XP.Kill to 100

    Here are some scripts I've been working on lately. https://mega.nz/folder/n5h2kZTb#vzQKsOxIKHEsJWEMse7qpQ

    - - - Updated - - -

    I created the Rate_NPC for you with xp rate options 1x-10x

    Last edited by skuly; 06-17-2021 at 09:11 PM.

  6. #6
    It can be w/e. Command or connect it to npc with gossip. Can even use AIO with it if u feel like it so u get neat UI

  7. #7
    Quote Originally Posted by skuly View Post
    Does it have to be an npc?
    I made a script that adds commands ".xp 1" to 10 to change rate and ".xp ?" to check set rate.

    But with these eluna scripts that change rates what happens is when a player gets xp the script intercepts the amount then multiplies it.

    So if the Worldserver.conf has things like Rate.XP.Kill, Rate.XP.Quest, and Rate.XP.Explore set to anything other than 1 it's going to multiply that xp when the player gets it... for example if servers Rate.XP.Kill is 10 and the player chooses .xp 10 then when the player kills something and gets the x10 xp the script multiples it by 10 which would be like setting Rate.XP.Kill to 100

    Here are some scripts I've been working on lately. https://mega.nz/folder/n5h2kZTb#vzQKsOxIKHEsJWEMse7qpQ

    - - - Updated - - -

    I created the Rate_NPC for you with xp rate options 1x-10x

    Sorry for the delay in thanking you
    Thank you very much for sharing your work
    Regards

  8. #8
    No problem, I decided to make a github repo for the scripts i'm working on.

    https://github.com/Juggalo187/Trinity-Eluna_Scripts.

    I've mostly been working on the .menu command.




    I've made minor updates to the custom_xp script, added an option to make it gm only and notify players when they login of the available commands.

    I was thinking of making gold cost optional too.


  9. #9
    Very good work
    Thanks for sharing it with newbies like me xDD

  10. #10

    REGISTER! (FREE)
    Registered members see less ads
    and also gain access to other great features.
    I'm kind of a newbie myself. Making these scripts has helped me learn lua and understand a bit. I'm sure my scripts are very sloppy to people who are very familiar with lua or other scripting languages.

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •