• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Lua TFS 0.3.6 If party is created, do something

waqmaz

Member
Joined
Jun 17, 2015
Messages
203
Reaction score
11
I am trying to make a function that if someone create party then the leader get an item. Which function should I use? I think a one of the creaturesctipts:
WEAPONS
onUseWeapon(cid, var)
SPELLS
onCastSpell(cid, var)
CREATURESCRIPTS
onLogin(cid)
onLogout(cid)
onAdvance(cid, skill, oldLevel, newLevel)
onStatsChange(cid, attacker, type, combat, value)
onDirection(cid, old, current)
onOutfit(cid, old, current)
onSendMail(cid, receiver, item, openBox)
onReceiveMail(cid, sender, item, openBox)
onTradeRequest(cid, target, item)
onTradeAccept(cid, target, item, targetItem)
onJoinChannel(cid, channel, users)
onLeaveChannel (cid, channel, users)
onLook(cid, thing, position, lookDistance)
onThink(cid, interval)
onTextEdit(cid, item, newText)
onReportBug(cid, comment)
onAreaCombat(cid, tileItem, tilePosition, isAggressive)
onPush(cid, target)
onTarget(cid, target)
onFollow(cid, target)
onCombat(cid, target)
onAttack(cid, target)
onCast(cid, target)
onKill(cid, target, lastHit)
onDeath(cid, corpse, deathList)
onPrepareDeath(cid, deathList)
GLOBALEVENTS
onThink(interval, lastExecution, thinkInterval)
onStartup()
onShutdown()
onRecord(current, old, cid)
onTimer()
MOVEMENTS
onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
onStepOut(cid, item, position, lastPosition, fromPosition, toPosition, actor)
onEquip(cid, item, slot)
onDeEquip(cid, item, slot)
onAddItem(moveItem, tileItem, position, cid)
onRemoveItem(moveItem, tileItem, position, cid)
TALKACTIONS
onSay(cid, words, param, channel)
 
Maybe lets try to modify a cpp script onJoinChannel to onJoinParty? :p

Oh my god seems that you got my point.
There is no c++ skills required but basic programming logic to adjust a already done feature to work as intended

Please dont get me mad but its a such simple task that the only way to not succeed is being lazy

Ofc that i wont make myself cuz this is not a request thread but ill be very happy to help if the code dont work at the first attempt

Please, TRY
 
Oh my god seems that you got my point.
There is no c++ skills required but basic programming logic to adjust a already done feature to work as intended

Please dont get me mad but its a such simple task that the only way to not succeed is being lazy

Ofc that i wont make myself cuz this is not a request thread but ill be very happy to help if the code dont work at the first attempt

Please, TRY
there is no event for joining a party, or creating a party afaik, so there is no efficient way to do it in lua only..
 
And that causes even more problems.
No inventory space, lack of capacity.
In either case, as stated, this shows the functionality that can be achieved, however should not be used as-is.
if there is no free slot in a leader's backpack or there is no item's cap, "you cannot create a party".
 
if there is no free slot in a leader's backpack or there is no item's cap, "you cannot create a party".
This would be a great idea if we could check those conditions before the party was created.. which is presently impossible without a source edit.
The option provided previously in this thread was a way to work around this limitation, so as not to require a source edit.
Albeit a varied solution, it does not have great functionality nor flexibility.

As suggested previously, attempt to create a source edit using current functions, and if it's not working as intended post your results here, along with your code snippets, and see if some of our competent members can assist you further.
 
Back
Top