Register for your free account! | Forgot your password?

You last visited: Today at 15:19

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

Advertisement



[RELEASE] Lua scripts functions

Discussion on [RELEASE] Lua scripts functions within the SRO PServer Guides & Releases forum part of the SRO Private Server category.

Reply
 
Old   #1
 
Kape7's Avatar
 
elite*gold: 0
Join Date: Dec 2007
Posts: 3,210
Received Thanks: 6,301
[RELEASE] Lua scripts functions

Hello. Last release.

This is an small documentation I made for myself for some of the functions from the Lua script files used for scripted events and quests.
I haven't tested most of them, and in general the whole script system is a bit messy, but if you decide to start creating stuff with it (like new quests or custom events) this may be helpful:

Code:
InsertPayItemCodeName(int Amount, <String CodeName>)
Return value: Unk
Result: Set the codename of the item to be given with the LuaAddItem_EXT function.

InsertPayItemRatio(int Amount, <float ratio (0 min, 100 max)>)
Return value: Unk
Result: Set the probability of obtaining the item selected on the payitemcodename function (follows the same order as the declared on that function)

LuaInsertDropItem(int Amount, <String CodeName, float dropProbability>)
Return value: Unk
Result: Set the items to be dropped from monsters and the probability of drop for each item (from 0 to 100)

InsertMenuStringList(String NPC_CodeName, int stringCount, <String msgType, String msgCodeName>)
Return value: Unk
Result: Assign specified chat strings to an NPC

LuaInsertNPC(int NPC_Count, <String NPC_CodeName>)
Return value: Unk
Result: Assign the functions previously declared on the specified NPC's.

LuaEventInQuireSameItem(int Unknown, String itemCodeName, int inquireType, int Unknown)
Return value: If inquireType = 0, return the slot number where the item is located, if 1 or 2 return the amount of items found on the stack.
Result: Find an specified item on the inventory and returns either the slot number or the amount of items found on the stack.

LuaDelItem_EXT(int Unknown, int slotNum, int Amount, int Reason, int Unknown)
Return value: Unk
Result: Delete the item placed on the specified slot on the inventory of the character.

LuaRanged_rand_f(int Min, int Max)
Return value: Random float number
Result: Returns a random float number on the range specified on the parameters. Result must be assigned to a variable.

LuaRangedRand(int Min, int Max)
Return value: Random int number
Result: Returns a random integer number on the range specified on the parameters. Result must be assigned to a variable.

LuaAddItem_EXT(int eventID, int Unknown, int Amount, int Reason, boolean Unknown, boolean Unknown, int itemID)
Return value: Unk
Result: Adds an specified item into the character's inventory. The itemID is the ID that the InsertPayItemCodeName assigns to the specified items (1 = first item, 2 = second item...).

LuaNpcHandlerNum()
Return value: NPC Handler ID
Result: Obtain the handler ID of the NPC that calls this function and assigns it into a variable, for later usage.

LuaShowMenu(int currentPage, int EventID, int listIndex, int Button, int NPCHandlerID)
Return value: Unk
Result: Displays the specified strings and options on the specified NPC.

LuaSetCurPage(int Page)
Return value: Unk
Result: Set the npc chat message page to the specified on the parameter.

LuaGetCurPage()
Return value: Page number
Result: Return the current page where the user is on.

LuaGetEventMenuResponse()
Return value: The ID of the option selected by the player on the NPC chat.
Result: Obtain the ID of the option choosen on the NPC chat, usually it must be recalculated after obtain it with "MenuOffset = MenuOffset - TALK_RESPONSE_LIST_BASE"

LuaGetCountEmptyInventory(int Unk, int Unk)
Return value: Amount of slots
Result: Return the amount of slots available on the character's inventory.

LuaTerminateMenu()
Return value: None
Result: Close the NPC chat window on the game's client.

LuaEngageBuffSkill(String skillCodeName)
Return value: None
Result: Cast the specified buff on the character invoking the function.

LuaIsActiveBuff(String skillCodeName)
Return value: Return the skillID if the buff is not affecting the character, or 1 if the buff is already casted on him.
Result: Returns a value depending on the state of the specified buff on the character that invokes the function.

LuaGiveEventPoint_EXP_Gold(int Exp, int spExp, int Gold)
Return value: None
Result: Gives the character who invoke the function the specified amount of exp, spexp and gold given on the parameters. Capped characters won't get any exp.

LuaGetPlayerLevel()
Return value: Char level
Result: Return the current character's level that invokes the function.

LuaGetPlayerGender()
Return value: Char gender
Result: Return the gender of the character, 0 if female, 1 if male.

LuaCompareGold(int Amount)
Return value: The result of the comparision
Result: Returns -1 if the gold of the player is less than the given amount, 0 if its the same, or 1 if its higher.
Kape7 is offline  
Thanks
20 Users
Old 11/22/2014, 12:42   #2
Chat Killer In Duty


 
PortalDark's Avatar
 
elite*gold: 5
Join Date: May 2008
Posts: 16,397
Received Thanks: 6,509
#Approved
PortalDark is offline  
Old 11/22/2014, 16:10   #3

 
KingDollar's Avatar
 
elite*gold: 1117
Join Date: Dec 2013
Posts: 858
Received Thanks: 806
nice keep it up
KingDollar is offline  
Old 11/22/2014, 17:10   #4
 
Justin1337*'s Avatar
 
elite*gold: 480
Join Date: Jan 2012
Posts: 655
Received Thanks: 579
Nice work, thanks Synx7.
Justin1337* is offline  
Old 11/23/2014, 02:46   #5
 
Royalblade*'s Avatar
 
elite*gold: 85
Join Date: Feb 2014
Posts: 1,056
Received Thanks: 1,644
Community aint worth it. I'd delete before too many people get it.
Royalblade* is offline  
Old 11/23/2014, 14:13   #6
 
댄싱판다's Avatar
 
elite*gold: 0
Join Date: Nov 2014
Posts: 38
Received Thanks: 10
Quote:
Originally Posted by blablaRoyal View Post
Community aint worth it. I'd delete before too many people get it.
Well Akasch, instead of bullshittin' that Communnity is not worth it, better if take care about your stuff. He did it, his release. Easy, nothing to explain.
댄싱판다 is offline  
Old 11/23/2014, 16:47   #7
 
Kape7's Avatar
 
elite*gold: 0
Join Date: Dec 2007
Posts: 3,210
Received Thanks: 6,301
Quote:
Originally Posted by blablaRoyal View Post
Community aint worth it. I'd delete before too many people get it.
I'd rather share it than have it on my 2nd HDD with dust on it and no use. I left the scene so I dont care anymore, I would like to see new cool stuff done with all of this though.
Kape7 is offline  
Thanks
3 Users
Old 11/23/2014, 23:18   #8
 
El-Joker's Avatar
 
elite*gold: 0
Join Date: Nov 2014
Posts: 123
Received Thanks: 36
keep sharing , ty
El-Joker is offline  
Old 11/25/2014, 22:26   #9


 
Dracula Untold's Avatar
 
elite*gold: 0
Join Date: Feb 2014
Posts: 1,866
Received Thanks: 517
nice
Dracula Untold is offline  
Old 09/27/2020, 15:31   #10
 
elite*gold: 0
Join Date: Nov 2017
Posts: 22
Received Thanks: 1


how can we do it like this

ramo19 is offline  
Reply


Similar Threads Similar Threads
ArcheAge Functions & Debug Logs - IDC Scripts
09/15/2014 - ArcheAge - 0 Replies
Heyo, People familiar with RE & IDA might find the scripts below helpfull :-p arche_functions.idc /* arche_functions.idc A tiny script which automatically renames some functions.
[Release]Homepage Functions
10/27/2012 - Metin2 PServer Guides & Strategies - 27 Replies
Hallo Epvp, ich hab für euch eine aus langeweile entstandene Functions geschrieben, die euch dabei helfen sollen für eure Homepage bestimmte sachen zu Scripten. Ich werde diese Functions desöfteren aktuallisieren. Der einbau ist ganz einfach. Einfach in eure Index zu den anderen require folgendes hinzufügen: require("./inc/functions_by_tobias.inc.php&q uot;);
[Release]Some functions DekaronServer.exe decompiler
08/14/2011 - Dekaron Private Server - 3 Replies
Some functions DekaronServer.exe decompiler. Hope this helps many people who understand c + + and want to get an emulator or something, with that and much easier to find some offsets and objectstruct, and understand the source code of how it was created server Dekaron and can add things that has the new global or Korean Dekaron. The functions are not 100% decompiler so I have time I will be finishing. DOWNLOAD :mofo:



All times are GMT +1. The time now is 15:20.


Powered by vBulletin®
Copyright ©2000 - 2026, 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 ©2026 elitepvpers All Rights Reserved.