Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

How to give exp to ONE player?


Shanjai
 Share

Recommended Posts

Hello, i was wondering if there was a command(server) that gives exp to Only one player instead of giving exp to everyone else in the server(i use the "Mass Experience" button in the Control panel)

Oh, sorry if my english sucks.

I'll be waiting for help  ;)
Link to comment
Share on other sites

@Black★Gold:

> I'm not sure but this might require a script.

Maybe… i suck too much at scripting, i think i gotta learn a bit of that so that i can do a command for it.
Because i was thinking of doing an event that if you give a special item to a GM, this GM gives you a little of EXP
Link to comment
Share on other sites

what engine are you using? you can also do a scripted item like a potion or something that gives the player EXP. Its actually quite simple.

EDIT: This is a level up Potion script.
You can change the +1 and +5 to whatever you want. Obviously when you level up once you get 5 stat points. So try to keep it in ratio (2 levels > 10 stat points, etc.)

*********Level Up Potion**************

    Case 0
        Call SetPlayerLevel(index, GetPlayerLevel(index) + 1)
        Call SetPlayerPOINTS(index, GetPlayerPOINTS(index) + 5)
End Select
End Sub

If you are using stable, which if you really can't script that well you should be, go into your server folder, then I believe your scripts folder, then your events folder. You will see a notepad document named "ScriptedItem" Open it up and paste this code under whatever is already there. I think there is already a Case 0\. So rename this Case 1\. Then what you do is save, and restart your server. (Close it and then reload it back up). Make sure your scripts are on, which they should be by default. (You turn them on and off from a button on your server window)

Finally, when you are in the game, create a new item. Pick the picture for it and whatever. Then on the drop down list select scripted. A side scrolling bar for the cases should pop up. Slide it to case 1\. Then you my friend have a "whatever you want" that levels you up.
Link to comment
Share on other sites

@Soul:

> No it won't, a minor fix.
>
> Add before Case Else.
>
> ```
>
>   Case 0
>         Call SetPlayerLevel(index, GetPlayerLevel(index) + 1)
>         Call SetPlayerPOINTS(index, GetPlayerPOINTS(index) + 5)
>
> ```

It worked, but the item won't delete(this means that players will be able to lvl up lots of times with the same item)
Link to comment
Share on other sites

then you will need to go to the script data base and find one that actually takes away the item. I just copied the first one I found. But I mean, you could hang on to that incase you actually wanted someone to have an item where they could constantly keep leveling up.

EDIT: Ok I'm helping you because I don't want you to be lost. I know that it can sometimes be kind of hard to get help around here haha. OK SO HERE'S A NEW APPROACH!

*******Level Up Spell*********
Sub ScriptedSpell(index, Script)
    Select Case Script
        Case 0

            Dim mpneeded 'Declare the MP variable
            mpneeded = 0 'The amount of MP needed

            If GetPlayerMP(index) >= mpneeded Then 'Check if the player has the required amount of MP
                Call SetPlayerLevel(index,  GetPlayerLevel(Index) +1) 'Increase the player's level by one
                Call SetPlayerMP( Index, GetPlayerMP( Index) - mpneeded) 'Substract the MP thats needed
                Call SendStats( Index) 'Updates the player's stats

            End If
    End Select
End Sub

THIS SPELL COULD BE AN ADMIN ONLY SPELL THAT YOU COULD MAKE YOURSELF LEARN. IN GAME YOU COULD CAST IT ON OTHERS TO LEVEL THEM UP. IM PRETTY SURE THIS HAS THE SAME EFFECTS AS THE POTION DID, HOWEVER IT IS A SPELL SO IT OBVIOUSLY WOULD NOT BE MISUSED.
Link to comment
Share on other sites

@Shanjai:

> @Soul:
>
> > No it won't, a minor fix.
> >
> > Add before Case Else.
> >
> > ```
> >
> >   Case 0
> >         Call SetPlayerLevel(index, GetPlayerLevel(index) + 1)
> >         Call SetPlayerPOINTS(index, GetPlayerPOINTS(index) + 5)
> >
> > ```
>
> It worked, but the item won't delete(this means that players will be able to lvl up lots of times with the same item)

Oh, i solved this one  :cheesy:
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...