Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Rappelz
You last visited: Today at 13:13

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Adding custom item effect and scripts

Discussion on Adding custom item effect and scripts within the Rappelz forum part of the MMORPGs category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Feb 2006
Posts: 513
Received Thanks: 193
Adding custom item effect and scripts

I found out about another script, that isnt present in the current 6.1 server files, that were released a while ago. It is convenient, as you can add new function to items, like opening dialogues (shops, auction, storage) or administer buffs.


1.) Download the 'on_use_item.lua' I wrote. Look at the bottom of his post. Copy it into your Resource/Script folder.
2.) Open it in your favorite text editor. Inside you will find:
3.) To add new functions, there are two things you gotta do. First, you'll have to know the ID of the item you are trying to modify. Then find that item inside this table: [Arcadia].[dbo].[ItemResource]
The last column is named 'script_text'. There you have to insert 'on_use_item' (without the quotes).
Second, you need to let the server know what to do. Inside the above posted lua-file look for
The X represent the item functions. To add a new one insert
just before the last 'end' in the lua-file. The Ys represent the ID of the item you want to add a new function. The Zs are the new function. I may make a list of what you can do later, but for now look inside other threads, they are the same as for login buffs or item insertions.
4.) Save the file and restart your server. Whenever you use the item the function you entered will be called.

Example:
I adjusted the Red Potion Lv1 inside the database to call the script with


The ID is 602001. Then I added a function. Whenever a Red Potion Lv1 is used it will insert another Red Potion Lv1. This is the complete on_use_item.lua for that, with out any other modifications:



WARNING
I wrote that lua-script myself based on my findings in the database.
I am not sure if the original script (that is stored away inside the server files) does anything else. I just added the items that already had that fuction build in, namely "Scroll of Storing", "Scroll of Bidding" and "Scroll of Boosting", which can be bought in the hidden village. If you use this there might be complications with unknown functions, but I am pretty sure, that those three are the only items/object calling that script.

WARNING 2
You cannot add such a function to an equippable item. I tested the three scrolls and the Red Potion. It seems it works just fine with any consumable item.

Have fun.

Edit: Creating the basic lua-file:

I cannot add lua-files, so make a new text-file and enter
Save it as on_use_item.lua

Alternately download
Mirror 1:
Mirror 2:
Ranma014 is offline  
Thanks
12 Users
Old 07/25/2011, 17:48   #2
 
lilnani's Avatar
 
elite*gold: 0
Join Date: Feb 2011
Posts: 597
Received Thanks: 174
i didnt understand
lilnani is offline  
Old 07/25/2011, 18:26   #3
 
elite*gold: 0
Join Date: Feb 2006
Posts: 513
Received Thanks: 193
Try reading it now, I changed my original post.
Of yourse you would need to know how to edit your database, use basix sql queries and how to code in lua (any basic programming language is sufficiant, just enter new items according to the 3 scrolls)
Ranma014 is offline  
Old 07/25/2011, 20:05   #4
 
wisp66's Avatar
 
elite*gold: 0
Join Date: Mar 2008
Posts: 939
Received Thanks: 517
nifty concept ^^ not sure how useful it is at first glance but it does open the doors to a few other options
wisp66 is offline  
Old 07/25/2011, 20:39   #5
 
elite*gold: 0
Join Date: Feb 2006
Posts: 513
Received Thanks: 193
Quote:
Originally Posted by wisp66 View Post
nifty concept ^^ not sure how useful it is at first glance but it does open the doors to a few other options
Well there was a problem with creature buffs on login, cause when you dual summoned your 2nd pet wont have those unless you relogged, which wasnt pratical. thats why i raised the dual summon time to almost unlimited. Now with this concept I addes those add_cstate commands to the use of a red potion lv1, so whenever i use one, my latest summoned pet will be fully buffed.

edit: btw wisp, could you pls add this thread and this one: as links to your sticky? cause the second one is already on the back pages. this section is getting spoammed alot by trolls and idiots who think they can setup a server with one click.
Ranma014 is offline  
Thanks
1 User
Old 07/25/2011, 21:54   #6
 
elite*gold: 0
Join Date: Oct 2010
Posts: 2,555
Received Thanks: 2,460
That is some true ingenuity you got there sir. +1
ismokedrow is offline  
Thanks
1 User
Old 07/25/2011, 22:55   #7
 
wisp66's Avatar
 
elite*gold: 0
Join Date: Mar 2008
Posts: 939
Received Thanks: 517
Quote:
Originally Posted by Ranma014 View Post
Well there was a problem with creature buffs on login, cause when you dual summoned your 2nd pet wont have those unless you relogged, which wasnt pratical. thats why i raised the dual summon time to almost unlimited. Now with this concept I addes those add_cstate commands to the use of a red potion lv1, so whenever i use one, my latest summoned pet will be fully buffed.

edit: btw wisp, could you pls add this thread and this one: as links to your sticky? cause the second one is already on the back pages. this section is getting spoammed alot by trolls and idiots who think they can setup a server with one click.
yep ill move it there when i get home later to night ^^
wisp66 is offline  
Old 11/12/2013, 21:50   #8
 
elite*gold: 0
Join Date: Jul 2010
Posts: 34
Received Thanks: 0
re-upload the files please
banditas231 is offline  
Old 11/15/2013, 21:39   #9
Moderator


 
ThunderNikk's Avatar
 
elite*gold: 1
Join Date: Dec 2012
Posts: 4,912
Received Thanks: 1,490
They are right up there in the OP that your necroposting.

They are only .txt files converted to .lua by changing the file extension and they are all written here in the spoilers.

No need to download them.
ThunderNikk is offline  
Old 01/15/2015, 19:46   #10
 
elite*gold: 0
Join Date: Mar 2013
Posts: 125
Received Thanks: 15
up up
hassuny is offline  
Reply


Similar Threads Similar Threads
Adding an effect
08/30/2010 - CO2 Private Server - 3 Replies
ohai everyone, How do I add an effect? It's got C3 files and .dds files.. Screenshot: http://i35.tinypic.com/1gnlnq.png Anybody have an idea how I can add it so I can use a string packet to launch that effect?
adding an effect to source ( I have an .dss )
04/05/2010 - CO2 Private Server - 7 Replies
Ok so I have an effect I want to add to the source so I can do /effect 1242 I have an .dss the I put in my client how do I add it into the source so when I do /effect 1242 it will do the effect
Adding an Effect to an item.
12/01/2009 - EO PServer Hosting - 19 Replies
Hey everyone i run into a little problem, i would like to add an effect to the item that i created and im not sure which files do i have to edit to get that effect working. so please let me know and i'll get you a thanks. :cool:
[Help]adding effect
10/30/2008 - CO2 Private Server - 2 Replies
how can u add a effect on a command so like when u us /revive u get the revive effect and /kill you see an effect can someone tell me how to do this



All times are GMT +1. The time now is 13:14.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.