• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[List] All LUA functions (for TFS)

Jonern

Retired
Senator
Joined
May 31, 2007
Messages
1,054
Reaction score
8
Location
Norway
Could anyone please post a detailed list of all the functions created for:
-Action scripts
-Talkaction scripts
-Creature scripts
-Movements scripts

Anything else I've forgot?

Example:
doPlayerSendTextMessage(cid,22,"message") -- cid is who it should affect, 22 is the color (from X to Y), the text that is to be displayed should either be a string or a number.

Regards, Jonern

Edit: Changed the topic :)
 
Last edited:
//getPlayerFood(uid)
lua_register(m_luaState, "getPlayerFood", LuaScriptInterface::luaGetPlayerFood);
//getCreatureHealth(uid)
lua_register(m_luaState, "getCreatureHealth", LuaScriptInterface::luaGetCreatureHealth);
//getCreatureMaxHealth(cid)
lua_register(m_luaState, "getCreatureMaxHealth", LuaScriptInterface::luaGetCreatureMaxHealth);
//getPlayerMana(uid)
lua_register(m_luaState, "getPlayerMana", LuaScriptInterface::luaGetPlayerMana);
//getPlayerMaxMana(uid)
lua_register(m_luaState, "getPlayerMaxMana", LuaScriptInterface::luaGetPlayerMaxMana);
//getPlayerLevel(uid)
lua_register(m_luaState, "getPlayerLevel", LuaScriptInterface::luaGetPlayerLevel);
//getPlayerMagLevel(uid)
lua_register(m_luaState, "getPlayerMagLevel", LuaScriptInterface::luaGetPlayerMagLevel);
//getPlayerName(uid)
lua_register(m_luaState, "getPlayerName", LuaScriptInterface::luaGetPlayerName);
//getPlayerAccess(uid)
lua_register(m_luaState, "getPlayerAccess", LuaScriptInterface::luaGetPlayerAccess);
//getPlayerPosition(uid)
lua_register(m_luaState, "getPlayerPosition", LuaScriptInterface::luaGetPlayerPosition);
//getPlayerSkill(uid,skillid)
lua_register(m_luaState, "getPlayerSkill", LuaScriptInterface::luaGetPlayerSkill);
//getPlayerTown(cid)
lua_register(m_luaState, "getPlayerTown", LuaScriptInterface::luaGetPlayerTown);
//getPlayerVocation(cid)
lua_register(m_luaState, "getPlayerVocation", LuaScriptInterface::luaGetPlayerVocation);
//getPlayerItemCount(cid,itemid)
lua_register(m_luaState, "getPlayerItemCount", LuaScriptInterface::luaGetPlayerItemCount);
//getPlayerSoul(cid)
lua_register(m_luaState, "getPlayerSoul", LuaScriptInterface::luaGetPlayerSoul);
//getPlayerFreeCap(cid)
lua_register(m_luaState, "getPlayerFreeCap", LuaScriptInterface::luaGetPlayerFreeCap);
//getPlayerLight(cid)
lua_register(m_luaState, "getPlayerLight", LuaScriptInterface::luaGetPlayerLight);
//getPlayerSlotItem(cid, slot)
lua_register(m_luaState, "getPlayerSlotItem", LuaScriptInterface::luaGetPlayerSlotItem);
//getPlayerDepotItems(uid, depotid)
lua_register(m_luaState, "getPlayerDepotItems", LuaScriptInterface::luaGetPlayerDepotItems);
//getPlayerGuildId(cid)
lua_register(m_luaState, "getPlayerGuildId", LuaScriptInterface::luaGetPlayerGuildId);
//getPlayerGuildName(cid)
lua_register(m_luaState, "getPlayerGuildName", LuaScriptInterface::luaGetPlayerGuildName);
//getPlayerGuildRank(cid)
lua_register(m_luaState, "getPlayerGuildRank", LuaScriptInterface::luaGetPlayerGuildRank);
//getPlayerGuildNick(cid)
lua_register(m_luaState, "getPlayerGuildNick", LuaScriptInterface::luaGetPlayerGuildNick);
//getPlayerSex(cid)
lua_register(m_luaState, "getPlayerSex", LuaScriptInterface::luaGetPlayerSex);
//getPlayerLookDir(cid)
lua_register(m_luaState, "getPlayerLookDir", LuaScriptInterface::luaGetPlayerLookDir);
//getPlayerGUID(cid)
lua_register(m_luaState, "getPlayerGUID", LuaScriptInterface::luaGetPlayerGUID);
//getPlayerFlagValue(cid, flag)
lua_register(m_luaState, "getPlayerFlagValue", LuaScriptInterface::luaGetPlayerFlagValue);

//getPlayerGroupId(cid)
lua_register(m_luaState, "getPlayerGroupId", LuaScriptInterface::luaGetPlayerGroupId);
//setPlayerGroupId(cid, newGroupId)
lua_register(m_luaState, "setPlayerGroupId", LuaScriptInterface::luaSetPlayerGroupId);

//playerLearnInstantSpell(cid, name)
lua_register(m_luaState, "playerLearnInstantSpell", LuaScriptInterface::luaPlayerLearnInstantSpell);
//getPlayerLearnedInstantSpell(cid, name)
lua_register(m_luaState, "getPlayerLearnedInstantSpell", LuaScriptInterface::luaGetPlayerLearnedInstantSpell);
//getPlayerInstantSpellCount(cid)
lua_register(m_luaState, "getPlayerInstantSpellCount", LuaScriptInterface::luaGetPlayerInstantSpellCount);
//getPlayerInstantSpellInfo(cid, index)
lua_register(m_luaState, "getPlayerInstantSpellInfo", LuaScriptInterface::luaGetPlayerInstantSpellInfo);

//getPlayerStorageValue(uid,valueid)
lua_register(m_luaState, "getPlayerStorageValue", LuaScriptInterface::luaGetPlayerStorageValue);
//setPlayerStorageValue(uid,valueid, newvalue)
lua_register(m_luaState, "setPlayerStorageValue", LuaScriptInterface::luaSetPlayerStorageValue);

//getGlobalStorageValue(valueid)
lua_register(m_luaState, "getGlobalStorageValue", LuaScriptInterface::luaGetGlobalStorageValue);
//setGlobalStorageValue(valueid, newvalue)
lua_register(m_luaState, "setGlobalStorageValue", LuaScriptInterface::luaSetGlobalStorageValue);

//getTilePzInfo(pos) 1 is pz. 0 no pz.
lua_register(m_luaState, "getTilePzInfo", LuaScriptInterface::luaGetTilePzInfo);
//getTileHouseInfo(pos). 0 no house. != 0 house id
lua_register(m_luaState, "getTileHouseInfo", LuaScriptInterface::luaGetTileHouseInfo);

//getItemRWInfo(uid)
lua_register(m_luaState, "getItemRWInfo", LuaScriptInterface::luaGetItemRWInfo);
//getThingfromPos(pos)
lua_register(m_luaState, "getThingfromPos", LuaScriptInterface::luaGetThingfromPos);
//getThing(uid)
lua_register(m_luaState, "getThing", LuaScriptInterface::luaGetThing);
//getThingPos(uid)
lua_register(m_luaState, "getThingPos", LuaScriptInterface::luaGetThingPos);

//doRemoveItem(uid,n)
lua_register(m_luaState, "doRemoveItem", LuaScriptInterface::luaDoRemoveItem);
//doPlayerFeed(uid,food)
lua_register(m_luaState, "doPlayerFeed", LuaScriptInterface::luaDoFeedPlayer);
//doPlayerSendCancel(uid,text)
lua_register(m_luaState, "doPlayerSendCancel", LuaScriptInterface::luaDoPlayerSendCancel);
//doPlayerSendDefaultCancel(uid, ReturnValue)
lua_register(m_luaState, "doPlayerSendDefaultCancel", LuaScriptInterface::luaDoSendDefaultCancel);
//doTeleportThing(uid,newpos,pushmove)
lua_register(m_luaState, "doTeleportThing", LuaScriptInterface::luaDoTeleportThing);
//doTransformItem(uid,toitemid)
lua_register(m_luaState, "doTransformItem", LuaScriptInterface::luaDoTransformItem);
//doCreatureSay(uid,text,type)
lua_register(m_luaState, "doCreatureSay", LuaScriptInterface::luaDoCreatureSay);
//doSendMagicEffect(position,type)
lua_register(m_luaState, "doSendMagicEffect", LuaScriptInterface::luaDoSendMagicEffect);
//doSendDistanceShoot(frompos, topos, type)
lua_register(m_luaState, "doSendDistanceShoot", LuaScriptInterface::luaDoSendDistanceShoot);
//doChangeTypeItem(uid,new_type)
lua_register(m_luaState, "doChangeTypeItem", LuaScriptInterface::luaDoChangeTypeItem);
//doSetItemActionId(uid,actionid)
lua_register(m_luaState, "doSetItemActionId", LuaScriptInterface::luaDoSetItemActionId);
//doSetItemText(uid,text)
lua_register(m_luaState, "doSetItemText", LuaScriptInterface::luaDoSetItemText);
//doSetItemSpecialDescription(uid,desc)
lua_register(m_luaState, "doSetItemSpecialDescription", LuaScriptInterface::luaDoSetItemSpecialDescription);
//doSendAnimatedText(position,text,color)
lua_register(m_luaState, "doSendAnimatedText", LuaScriptInterface::luaDoSendAnimatedText);
//doPlayerAddSkillTry(cid,skillid,n)
lua_register(m_luaState, "doPlayerAddSkillTry", LuaScriptInterface::luaDoPlayerAddSkillTry);
//doCreatureAddHealth(cid,health)
lua_register(m_luaState, "doCreatureAddHealth", LuaScriptInterface::luaDoCreatureAddHealth);
//doPlayerAddMana(cid,mana)
lua_register(m_luaState, "doPlayerAddMana", LuaScriptInterface::luaDoPlayerAddMana);
//doPlayerAddSoul(cid,soul)
lua_register(m_luaState, "doPlayerAddSoul", LuaScriptInterface::luaDoPlayerAddSoul);
//doPlayerAddItem(cid,itemid,count or type) . returns uid of the created item
lua_register(m_luaState, "doPlayerAddItem", LuaScriptInterface::luaDoPlayerAddItem);
//doPlayerSendTextMessage(cid,MessageClasses,message)
lua_register(m_luaState, "doPlayerSendTextMessage", LuaScriptInterface::luaDoPlayerSendTextMessage);
//doPlayerRemoveMoney(cid,money)
lua_register(m_luaState, "doPlayerRemoveMoney", LuaScriptInterface::luaDoPlayerRemoveMoney);
//doShowTextWindow(cid,maxlen,canWrite)
lua_register(m_luaState, "doShowTextWindow", LuaScriptInterface::luaDoShowTextWindow);
//doShowTextDialog(cid,itemid,text)
lua_register(m_luaState, "doShowTextDialog", LuaScriptInterface::luaDoShowTextDialog);
//doDecayItem(uid)
lua_register(m_luaState, "doDecayItem", LuaScriptInterface::luaDoDecayItem);
//doCreateItem(itemid,type or count,position) .only working on ground. returns uid of the created item
lua_register(m_luaState, "doCreateItem", LuaScriptInterface::luaDoCreateItem);
//doCreateTeleport(itemid, topos, createpos)
lua_register(m_luaState, "doCreateTeleport", LuaScriptInterface::luaDoCreateTeleport);
//doSummonCreature(name, position)
lua_register(m_luaState, "doSummonCreature", LuaScriptInterface::luaDoSummonCreature);
//doConvinceCreature(cid, target)
lua_register(m_luaState, "doConvinceCreature", LuaScriptInterface::luaDoConvinceCreature);
//doRemoveCreature(cid)
lua_register(m_luaState, "doRemoveCreature", LuaScriptInterface::luaDoRemoveCreature);
//doMoveCreature(cid, direction)
lua_register(m_luaState, "doMoveCreature", LuaScriptInterface::luaDoMoveCreature);
//doPlayerSetTown(cid, townid)
lua_register(m_luaState, "doPlayerSetTown", LuaScriptInterface::luaDoPlayerSetTown);
//doPlayerSetVocation(cid,voc)
lua_register(m_luaState, "doPlayerSetVocation", LuaScriptInterface::luaDoPlayerSetVocation);
//doPlayerRemoveItem(cid,itemid,count)
lua_register(m_luaState, "doPlayerRemoveItem", LuaScriptInterface::luaDoPlayerRemoveItem);
//doPlayerAddExp(cid,exp)
lua_register(m_luaState, "doPlayerAddExp", LuaScriptInterface::luaDoPlayerAddExp);
//doPlayerSetGuildId(cid, id)
//lua_register(m_luaState, "doPlayerSetGuildId", LuaScriptInterface::luaDoPlayerSetGuildId);
//doPlayerSetGuildRank(cid, rank)
lua_register(m_luaState, "doPlayerSetGuildRank", LuaScriptInterface::luaDoPlayerSetGuildRank);
//doPlayerSetGuildNick(cid, nick)
lua_register(m_luaState, "doPlayerSetGuildNick", LuaScriptInterface::luaDoPlayerSetGuildNick);
//doPlayerAddOutfit(cid,looktype,addons)
lua_register(m_luaState, "doPlayerAddOutfit", LuaScriptInterface::luaDoPlayerAddOutfit);
//doPlayerRemOutfit(cid,looktype,addons)
lua_register(m_luaState, "doPlayerRemOutfit", LuaScriptInterface::luaDoPlayerRemOutfit);
//doSetCreatureLight(cid, lightLevel, lightColor, time)
lua_register(m_luaState, "doSetCreatureLight", LuaScriptInterface::luaDoSetCreatureLight);
//getCreatureCondition(cid, condition)
lua_register(m_luaState, "getCreatureCondition", LuaScriptInterface::luaGetCreatureCondition);

//isPlayer(cid)
lua_register(m_luaState, "isPlayer", LuaScriptInterface::luaIsPlayer);
//isCreature(cid)
lua_register(m_luaState, "isCreature", LuaScriptInterface::luaIsCreature);
//isContainer(uid)
lua_register(m_luaState, "isContainer", LuaScriptInterface::luaIsContainer);
//isMoveable(uid)
lua_register(m_luaState, "isMoveable", LuaScriptInterface::luaIsMoveable);

//getPlayerByName(name)
lua_register(m_luaState, "getPlayerByName", LuaScriptInterface::luaGetPlayerByName);
//getPlayerGUIDByName(name)
lua_register(m_luaState, "getPlayerGUIDByName", LuaScriptInterface::luaGetPlayerGUIDByName);
//registerCreatureEvent(uid, eventName)
lua_register(m_luaState, "registerCreatureEvent", LuaScriptInterface::luaRegisterCreatureEvent);

//getContainerSize(uid)
lua_register(m_luaState, "getContainerSize", LuaScriptInterface::luaGetContainerSize);
//getContainerCap(uid)
lua_register(m_luaState, "getContainerCap", LuaScriptInterface::luaGetContainerCap);
//getContainerItem(uid, slot)
lua_register(m_luaState, "getContainerItem", LuaScriptInterface::luaGetContainerItem);
//doAddContainerItem(uid, itemid, count or subtype)
lua_register(m_luaState, "doAddContainerItem", LuaScriptInterface::luaDoAddContainerItem);

//getHouseOwner(houseid)
lua_register(m_luaState, "getHouseOwner", LuaScriptInterface::luaGetHouseOwner);
//getHouseName(houseid)
lua_register(m_luaState, "getHouseName", LuaScriptInterface::luaGetHouseName);
//getHouseEntry(houseid)
lua_register(m_luaState, "getHouseEntry", LuaScriptInterface::luaGetHouseEntry);
//getHouseRent(houseid)
lua_register(m_luaState, "getHouseRent", LuaScriptInterface::luaGetHouseRent);
//getHouseTown(houseid)
lua_register(m_luaState, "getHouseTown", LuaScriptInterface::luaGetHouseTown);
//getHouseAccessList(houseod, listid)
lua_register(m_luaState, "getHouseAccessList", LuaScriptInterface::luaGetHouseAccessList);
//getHouseByPlayerGUID(playerGUID)
lua_register(m_luaState, "getHouseByPlayerGUID", LuaScriptInterface::luaGetHouseByPlayerGUID);
//setHouseAccessList(houseid, listid, listtext)
lua_register(m_luaState, "setHouseAccessList", LuaScriptInterface::luaSetHouseAccessList);
//setHouseOwner(houseid, ownerGUID)
lua_register(m_luaState, "setHouseOwner", LuaScriptInterface::luaSetHouseOwner);

//getWorldType()
lua_register(m_luaState, "getWorldType", LuaScriptInterface::luaGetWorldType);
//getWorldTime()
lua_register(m_luaState, "getWorldTime", LuaScriptInterface::luaGetWorldTime);
//getWorldLight()
lua_register(m_luaState, "getWorldLight", LuaScriptInterface::luaGetWorldLight);
//getWorldCreatures(type) 0 players, 1 monsters, 2 npcs, 3 all
lua_register(m_luaState, "getWorldCreatures", LuaScriptInterface::luaGetWorldCreatures);
//getWorldUpTime()
lua_register(m_luaState, "getWorldUpTime", LuaScriptInterface::luaGetWorldUpTime);
//broadcastMessage(message)
lua_register(m_luaState, "broadcastMessage", LuaScriptInterface::luaBroadcastMessage);
//getGuildId(guild_name)
lua_register(m_luaState, "getGuildId", LuaScriptInterface::luaGetGuildId);

//getPlayerSex(cid)
lua_register(m_luaState, "getPlayerSex", LuaScriptInterface::luaGetPlayerSex);
//doPlayerSetSex(cid, newSex)
lua_register(m_luaState, "doPlayerSetSex", LuaScriptInterface::luaDoPlayerSetSex);

//createCombatArea( {area}, {extArea} )
lua_register(m_luaState, "createCombatArea", LuaScriptInterface::luaCreateCombatArea);

//createConditionObject(type)
lua_register(m_luaState, "createConditionObject", LuaScriptInterface::luaCreateConditionObject);

//setCombatArea(combat, area)
lua_register(m_luaState, "setCombatArea", LuaScriptInterface::luaSetCombatArea);

//setCombatCondition(combat, condition)
lua_register(m_luaState, "setCombatCondition", LuaScriptInterface::luaSetCombatCondition);

//setCombatParam(combat, key, value)
lua_register(m_luaState, "setCombatParam", LuaScriptInterface::luaSetCombatParam);

//setConditionParam(condition, key, value)
lua_register(m_luaState, "setConditionParam", LuaScriptInterface::luaSetConditionParam);

//addDamageCondition(condition, key, rounds, time, value)
lua_register(m_luaState, "addDamageCondition", LuaScriptInterface::luaAddDamageCondition);

//addOutfitCondition(condition, lookTypeEx, lookType, lookHead, lookBody, lookLegs, lookFeet)
lua_register(m_luaState, "addOutfitCondition", LuaScriptInterface::luaAddOutfitCondition);

//setCombatCallBack(combat, key, function_name)
lua_register(m_luaState, "setCombatCallback", LuaScriptInterface::luaSetCombatCallBack);

//setCombatFormula(combat, type, mina, minb, maxa, maxb)
lua_register(m_luaState, "setCombatFormula", LuaScriptInterface::luaSetCombatFormula);

//setConditionFormula(combat, mina, minb, maxa, maxb)
lua_register(m_luaState, "setConditionFormula", LuaScriptInterface::luaSetConditionFormula);

//doCombat(cid, combat, param)
lua_register(m_luaState, "doCombat", LuaScriptInterface::luaDoCombat);

//createCombatObject()
lua_register(m_luaState, "createCombatObject", LuaScriptInterface::luaCreateCombatObject);

//doAreaCombatHealth(cid, type, pos, area, min, max, effect)
lua_register(m_luaState, "doAreaCombatHealth", LuaScriptInterface::luaDoAreaCombatHealth);

//doTargetCombatHealth(cid, target, type, min, max, effect)
lua_register(m_luaState, "doTargetCombatHealth", LuaScriptInterface::luaDoTargetCombatHealth);

//doAreaCombatMana(cid, pos, area, min, max, effect)
lua_register(m_luaState, "doAreaCombatMana", LuaScriptInterface::luaDoAreaCombatMana);

//doTargetCombatMana(cid, target, min, max, effect)
lua_register(m_luaState, "doTargetCombatMana", LuaScriptInterface::luaDoTargetCombatMana);

//doAreaCombatCondition(cid, pos, area, condition, effect)
lua_register(m_luaState, "doAreaCombatCondition", LuaScriptInterface::luaDoAreaCombatCondition);

//doTargetCombatCondition(cid, target, condition, effect)
lua_register(m_luaState, "doTargetCombatCondition", LuaScriptInterface::luaDoTargetCombatCondition);

//doAreaCombatDispel(cid, pos, area, type, effect)
lua_register(m_luaState, "doAreaCombatDispel", LuaScriptInterface::luaDoAreaCombatDispel);

//doTargetCombatDispel(cid, target, type, effect)
lua_register(m_luaState, "doTargetCombatDispel", LuaScriptInterface::luaDoTargetCombatDispel);

//doChallengeCreature(cid, target)
lua_register(m_luaState, "doChallengeCreature", LuaScriptInterface::luaDoChallengeCreature);

//numberToVariant(number)
lua_register(m_luaState, "numberToVariant", LuaScriptInterface::luaNumberToVariant);

//stringToVariant(string)
lua_register(m_luaState, "stringToVariant", LuaScriptInterface::luaStringToVariant);

//positionToVariant(pos)
lua_register(m_luaState, "positionToVariant", LuaScriptInterface::luaPositionToVariant);

//targetPositionToVariant(pos)
lua_register(m_luaState, "targetPositionToVariant", LuaScriptInterface::luaTargetPositionToVariant);

//variantToNumber(var)
lua_register(m_luaState, "variantToNumber", LuaScriptInterface::luaVariantToNumber);

//variantToString(var)
lua_register(m_luaState, "variantToString", LuaScriptInterface::luaVariantToString);

//variantToPosition(var)
lua_register(m_luaState, "variantToPosition", LuaScriptInterface::luaVariantToPosition);

//doChangeSpeed(cid, delta)
lua_register(m_luaState, "doChangeSpeed", LuaScriptInterface::luaDoChangeSpeed);

//doSetMonsterOutfit(cid, name, time)
lua_register(m_luaState, "doSetMonsterOutfit", LuaScriptInterface::luaSetMonsterOutfit);
//doSetItemOutfit(cid, item, time)
lua_register(m_luaState, "doSetItemOutfit", LuaScriptInterface::luaSetItemOutfit);
//doSetCreatureOutfit(cid, outfit, time)
lua_register(m_luaState, "doSetCreatureOutfit", LuaScriptInterface::luaSetCreatureOutfit);
//getCreatureOutfit(cid)
lua_register(m_luaState, "getCreatureOutfit", LuaScriptInterface::luaGetCreatureOutfit);
//getCreaturePosition(cid)
lua_register(m_luaState, "getCreaturePosition", LuaScriptInterface::luaGetCreaturePosition);
//getCreatureName(cid)
lua_register(m_luaState, "getCreatureName", LuaScriptInterface::luaGetCreatureName);
//getCreatureSpeed(cid)
lua_register(m_luaState, "getCreatureSpeed", LuaScriptInterface::luaGetCreatureSpeed);
//getCreatureBaseSpeed(cid)
lua_register(m_luaState, "getCreatureBaseSpeed", LuaScriptInterface::luaGetCreatureBaseSpeed);
//getCreatureTarget(cid)
lua_register(m_luaState, "getCreatureTarget", LuaScriptInterface::luaGetCreatureTarget);

//isItemStackable(itemid)
lua_register(m_luaState, "isItemStackable", LuaScriptInterface::luaIsItemStackable);
//isItemRune(itemid)
lua_register(m_luaState, "isItemRune", LuaScriptInterface::luaIsItemRune);
//isItemDoor(itemid)
lua_register(m_luaState, "isItemDoor", LuaScriptInterface::luaIsItemDoor);
//isItemContainer(itemid)
lua_register(m_luaState, "isItemContainer", LuaScriptInterface::luaIsItemContainer);
//isItemFluidContainer(itemid)
lua_register(m_luaState, "isItemFluidContainer", LuaScriptInterface::luaIsItemFluidContainer);
//getItemName(itemid)
lua_register(m_luaState, "getItemName", LuaScriptInterface::luaGetItemName);
//getItemWeight(itemid, count)
lua_register(m_luaState, "getItemWeight", LuaScriptInterface::luaGetItemWeight);

//debugPrint(text)
lua_register(m_luaState, "debugPrint", LuaScriptInterface::luaDebugPrint);
//isInArray(array, value)
lua_register(m_luaState, "isInArray", LuaScriptInterface::luaIsInArray);

//addEvent(callback, delay, parameter)
lua_register(m_luaState, "addEvent", LuaScriptInterface::luaAddEvent);
//stopEvent(eventid)
lua_register(m_luaState, "stopEvent", LuaScriptInterface::luaStopEvent);

//doPlayerPopupFYI(cid, message)
lua_register(m_luaState, "doPlayerPopupFYI", LuaScriptInterface::luaDoPlayerPopupFYI);
//mayNotLogout(cid, value)
lua_register(m_luaState, "mayNotLogout", LuaScriptInterface::luaMayNotLogout);
//mayNotMove(cid, value)
lua_register(m_luaState, "mayNotMove", LuaScriptInterface::luaMayNotMove);

//doPlayerAddPremiumDays(cid, days)
lua_register(m_luaState, "doPlayerAddPremiumDays", LuaScriptInterface::luaDoPlayerAddPremiumDays);
//doPlayerRemovePremiumDays(cid, days)
lua_register(m_luaState, "doPlayerRemovePremiumDays", LuaScriptInterface::luaDoPlayerRemovePremiumDays);
//getPlayerPremiumDays(cid)
lua_register(m_luaState, "getPlayerPremiumDays", LuaScriptInterface::luaGetPlayerPremiumDays);

//getPromotedVocation(vocation)
lua_register(m_luaState, "getPromotedVocation", LuaScriptInterface::luaGetPromotedVocation);

//getPlayerBlessing(cid, blessing)
lua_register(m_luaState, "getPlayerBlessing", LuaScriptInterface::luaGetPlayerBlessing);
//doPlayerAddBlessing(cid, blessing)
lua_register(m_luaState, "doPlayerAddBlessing", LuaScriptInterface::luaDoPlayerAddBlessing);

//savePlayers()
lua_register(m_luaState, "savePlayers", LuaScriptInterface::luaSavePlayers);
 
That what I was looking for, on the other forum no1 helped me lol

Yessssss! I did my premium seller npc finaly, thanks again for the functions :)
 
Last edited by a moderator:
To make haste lasts longs just change:
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

local condition = createConditionObject(CONDITION_HASTE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 20000)
setConditionFormula(condition, 0.3, -24, 0.3, -24)
setCombatCondition(combat, condition)

function onCastSpell(cid, var)
	doCombat(cid, combat, var)
end

change the 2000 for another higher number :)
 
How this two functions works?
Code:
doPlayerSetGuildId(cid,id)
doPlayerSetGuildRank(cid,rank)

Tryed:
doPlayerSetGuildId(cid,name_of_the_guild)
doPlayerSetGuildRank(cid,3)
and don't worked =(
 
Hmm ill test it so.. another thing, how do i make to NPC verify if a Guild name already exist?
im trying:
Code:
if getGuildId(guild_name) == gname then
selfSay('Sorry, there is already a guild with that name.')
return false

where gname is the name you type for the guildname, don't know what do I need to put on getguildId..

edit= also im getting error when trying to put 'doPlayerSetGuildId(cid,3)':
Code:
data/npc/scripts/guildman.lua:71: attempt to call global 'doPlayerSetGuildId' (a nil value)

How do Ill make to the NPC make the guild? there's no doPlayerSetGuildName.. =/
 
Last edited:
ID is not name, it's a number value of the guild.

@Jonern: that is possible.
 
How this two functions works?
Code:
doPlayerSetGuildId(cid,id)
doPlayerSetGuildRank(cid,rank)

Tryed:
doPlayerSetGuildId(cid,name_of_the_guild)
doPlayerSetGuildRank(cid,3)
and don't worked =(

it is doPlayerSetGuildId(cid,guild_id_here)(i think)
 
Awesome, thanks talanturen, thanks to that, i finished my house npc seller!!
I didnt know this functions even existed :D
Although i still need to find how to make it so that if someone says !temple he gets teleported to temple
 
Back
Top