L2Tower Discord Let's keep the community alive with discord. Discussions about plugins and scripts L2Tower Discord

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
l2divine functions ported to l2tower
Author Message
lifenz Offline
Expired VIP Member
**

Posts: 62
Joined: Feb 2014
Reputation: 33
Version: 1.4.2.142
Post: #1
Question l2divine functions ported to l2tower

Hello,

As a former l2divine user that migrated to l2tower, I wanted to re-use existing scripts on l2tower. That is why I ported some functions for people who would like to migrate to l2tower.

Instruction for porting an existing l2divine script to l2tower script:
- replace every comments "//" by "--"
- replace every "label:" and Jump() call by "::label::" and goto (lua label convention)
- replace every "If" by "if"
- replace every "Else" by "else"
- replace every "{" by "then"
- replace every "}" by "end"
- put l2divine.lua on your script folder
- include this line on the beginning of your script :
dofile (GetDir() .. "\\scripts\\l2divine.lua")


l2divine.lua
Code:
l2tower_MoveTo = MoveTo
Console = 0

function Msg(Console, message)
    ShowToClient("L2Tower", message)
end

function Include(fileName)
    dofile (GetDir() .. "\\scripts\\" .. fileName)
end

function MoveTo(x, y, z)
    local moveDistance = 30
    l2tower_MoveTo(x, y, z, moveDistance)
end

function Delay(ms)
    Sleep(ms)
end

function NpcDialog(npc_id)
    ClearTargets()
    TargetNpc("", npc_id);
    Talk();
end

function LocInRange(x, y, z, radius)
    return math.floor(GetMe():GetRangeTo(x,y,z)) <= radius
end

function BattleStart()
    SetPause(false)
end

function BattleStop()
    SetPause(true)
end

There are still some function to recode...

Todo :
- ClearHuntingArea with TargettingSettings
- AddRectHuntingArea with TargettingSettings
- SetBattleArea with TargettingSettings
- SelectDialog with html parsing : DONE, look at here http://forum.l2tower.eu/thread-select-np...lay-string
- CloseDialog
- CountItem
(This post was last modified: 03-22-2014 19:51 PM by lifenz.)
03-15-2014 22:43 PM
Find all posts by this user Quote this message in a reply
 Reputed by : Fox(+2)
NaoJogoMais Offline
I'm Watching You!
**

Posts: 922
Joined: Oct 2012
Reputation: 194
Version: 1.4.2.132
Post: #2
RE: l2divine functions ported to l2tower

The best fuction from Divine is, OOG mode. Big Grin

.


[ RETIRED ]
...from retail!



[Image: 201628.png]
03-19-2014 15:43 PM
Find all posts by this user Quote this message in a reply
lifenz Offline
Expired VIP Member
**

Posts: 62
Joined: Feb 2014
Reputation: 33
Version: 1.4.2.142
Post: #3
RE: l2divine functions ported to l2tower

And radar map !
03-21-2014 02:14 AM
Find all posts by this user Quote this message in a reply
lifenz Offline
Expired VIP Member
**

Posts: 62
Joined: Feb 2014
Reputation: 33
Version: 1.4.2.142
Post: #4
RE: l2divine functions ported to l2tower

CountItem, TargetInRange, NoMobInHuntingArea done, will publish them later
03-22-2014 19:52 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  [GUIDE] L2Tower as a scanbot for private stores, and a bit more dimkkXX 0 3,053 04-25-2016 00:36 AM
Last Post: dimkkXX
  L2.exe stop working + L2Tower Update Failing azorean 15 16,779 09-27-2015 21:14 PM
Last Post: calladr
  L2Tower INJECTING TIME argentinianjesus 1 3,851 08-23-2014 15:41 PM
Last Post: Fox
  ERROR CAN'T USE L2TOWER xalbyx 1 4,215 03-02-2014 17:56 PM
Last Post: Fox
Information L2Tower not working anymore azorean 3 7,365 02-07-2014 12:06 PM
Last Post: azorean
  problem with run l2tower xanoch666 0 4,425 09-29-2013 13:49 PM
Last Post: xanoch666
  How To Run L2Tower and ZRanger at same time rampage186 3 9,741 01-10-2013 22:47 PM
Last Post: Hebdzik
  l2tower.exe 2 lougane 2 6,368 10-27-2012 23:53 PM
Last Post: Fox
  l2tower.exe ? lougane 2 5,452 10-27-2012 12:14 PM
Last Post: ClockMan



User(s) browsing this thread: 1 Guest(s)