Eclipse
January 05, 2009, 10:50:22 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
   Home   Chat Help Rules Arcade Search Calendar Gallery Login Register  
 
 
 
Recent Topics +-
Dreadlord Online v1.2 Beta - Need Moderators and Trustworthy Mappers! by The Roujo
Today at 10:50:21 PM

Server Status by Teh_General
Today at 10:49:04 PM

I need a little help by Teh_General
Today at 10:47:47 PM

My Custom GUI by Teh_General
Today at 10:45:29 PM

Lostica [Project Revamp] by MrMiguu™
Today at 10:28:55 PM

Party system : is it possible? by The Roujo
Today at 10:24:45 PM

Which version of eclipse do you like most for sadscripting? by The Roujo
Today at 10:24:19 PM

THE Cult by The Roujo
Today at 10:21:24 PM

Actual Map for the continents by FS:CG Admin[Shadowwulf]
Today at 10:20:45 PM

Disparity Recruiting by The Roujo
Today at 10:20:14 PM

Members Online +-
9 Guests, 15 Users
The Roujo,
Kreator,
Teh_General,
Smile!,
HawkStorm95,
The Troy,
Thelettersix,
kira423,
MrMiguu™,
Xeross,
shakadaran,
Simius Cruentus,
DinosaurFreak,
thingyguy,
Marsh
Pages: [1] 2
  Print  
Author Topic: Skills [4/5]  (Read 3842 times)
0 Members and 1 Guest are viewing this topic.
Godlord
Stephanus sum
Veteran
Teh Uberleet
*
Offline Offline

Posts: 4,109


View Profile WWW Email
« on: January 27, 2007, 06:22:10 PM »



Quote
Non-Scripter: [4/5]
Beginner: [3/5]
Advanced Scripter: [3/5]
Pro Scripter: [2/5]
Expert: [1/5]

Index:
  • Woodcutting
  • Mining
  • Mining

Woodcutting
Code:

In Sub JoinGame(index) above End Sub add this:
Code: [Select]
If GetVar("Skills\DB.ini", GetPlayerName(Index), "Woodcutting") = "0" Then
Call PutVar("Skills\DB.ini", GetPlayerName(Index), "WoodcuttingExp", "0")
Call PutVar("Skills\DB.ini", GetPlayerName(Index), "Woodcutting", "1")
End If

In Sub OnAttack(index) Add under Sub OnAttack(index) if not added:
Code: [Select]
Dim Checked
In Sub OnAttack(index) Add above of End Sub:
Code: [Select]
Checked = CheckIt(index)
If Checked = 1 Then
Call WoodcuttingMsg(index, Woodcut)
End If
End Sub

Add this total down in your main:
Code: [Select]
Sub GiveItem(index, item, value)
SLOT = 1
Do While SLOT < 24
If GetPlayerInvItemNum(index, SLOT) = 0 Then
Call SetPlayerInvItemNum(index, SLOT, item)
Call SetPlayerInvItemValue(index, SLOT, value)
Call SendInventoryUpdate(index, SLOT)
SLOT = 24
End If
SLOT = SLOT+1
Loop
End Sub

Add this total down in your main:
Code: [Select]
Sub CheckIt(index)
Dim WoodcuttingSpotX
Dim WoodcuttingSpotY
Dim i
Dim memX
Dim Fish
Dim WoodcuttingSpotM
i = 1
Do While i <= GetVar("Skills\Woodcutting.ini", i ,"items")
WoodcuttingSpotX = GetVar("Skills\Woodcutting.ini", i ,"X")
WoodcuttingSpotY = GetVar("Skills\Woodcutting.ini", i ,"Y")
WoodcuttingSpotM = GetVar("Skills\Woodcutting.ini", i ,"MAP")
memX = i
if GetPlayerMap(index) = WoodcuttingSpotM then
if WoodcuttingSpotY = Int(GetPlayerY(index) + 1) and WoodcuttingSpotX = Int(GetPlayerX(index) + 1) then
CheckIt = 1
i = 21
elseif WoodcuttingSpotY = Int(GetPlayerY(index) - 1) and WoodcuttingSpotX = Int(GetPlayerX(index) - 1) then
CheckIt = 1
i = 21
elseif WoodcuttingSpotY = Int(GetPlayerY(index) + 1) and WoodcuttingSpotX = Int(GetPlayerX(index) - 1) then
CheckIt = 1
i = 21
elseif WoodcuttingSpotY = Int(GetPlayerY(index) - 1) and WoodcuttingSpotX = Int(GetPlayerX(index) + 1) then
CheckIt = 1
i = 21
else
CheckIt = 0
i = Int(memX + 1)
end if
end if
loop
End Sub

Add this total down in your main:
Code: [Select]
Sub WoodcuttingMsg(index, wood)
Dim wclv
Dim change
Dim item
Dim val
Dim i
If wood = 1 Then
If GetPlayerWeapon = GetVar("Skills\Woodcutting.ini", i ,"weapon") Then
Call PlayerMsg(index, "You started with cutting some wood", 12)
i = Rand(1, 10000)
wclv = GetVar("Skills\DB.ini","GetPlayerName(index), "Woodcutting")
change = GetVar("Skills\Change.ini", "Woodcutting", wclv & "-" & i)
change = mid(change, 1, 3) & "00"
max = GetVar("Skills\max.ini", "Woodcutting", "WCMAX")
item = GetVar("Skills\Woodcutting.ini", i ,"item")
val = GetVar("Skills\Woodcutting.ini", i ,"val")
If i >= change Then
Call PlayerMsg(index, "You cutted some wood", 12)
Call GiveItem(index, item, val)
Call SetWoodcuttingExperience(index, GetVar("Skills\Woodcutting.ini", i ,"exp"))
Else
Call PlayerMsg(index, "You failed with cutting some wood", 12)
End If
End If
End If
End Sub

Add this total down in your main:
Code: [Select]
Sub SetWoodcuttingExperience(index, exp)
Dim wclv
Dim pexp
Dim max
Dim wcmax
wclv = GetVar("Skills\DB.ini","GetPlayerName(index), "Woodcutting")
wcmax = GetVar("Skills\max.ini", "Woodcutting", "maxlv")
pexp = GetVar("Skills\DB.ini","GetPlayerName(index), "WoodcuttingExp")
max = GetVar("Skills\max.ini", "Woodcutting", "maxexp" & wclv)
if Int(pexp + exp) > max then
if wclv < maxlv then
Call PutVar("Skills\DB.ini","GetPlayerName(index), "WoodcuttingExp", Int(exp - Int(max - pexp)))
Call PutVar("Skills\DB.ini","GetPlayerName(index), "Woodcutting", Int(wclv + 1))
Call PlayerMsg(index, "You gained a woodcutting level", 12)
elseif wclv = maxlv then
Call PutVar("Skills\DB.ini","GetPlayerName(index), "WoodcuttingExp", 0)
Call PutVar("Skills\DB.ini","GetPlayerName(index), "Woodcutting", maxlv)
end if
elseif Int(pexp + exp) <= max then
Call PutVar("Skills\DB.ini","GetPlayerName(index), "WoodcuttingExp", Int(pexp + exp))
end if
End Sub


INI files:

In map "Skills" on the server create the next files:
Woodcutting.ini
Code: [Select]
[1]
X=2
Y=2
MAP=23
weapon=2
item=3
val=0
[2]
X=5
Y=5
MAP=99
weapon=2
item=45
val=0

Change.ini
Code: [Select]
[Woodcutting]
1-1=2
2-1=5
1-2=0
2-2=4

max.ini
Code: [Select]
[Woodcutting]
WCMAX=2
maxlv=2
maxexp1=100
maxexp2=300


INI configuration:

Woodcutting.ini
Quote
[1]
1 is the section of which number goes from 1 to WCMAX out max.ini.

Quote
X=2
2 is the X of the tree.

Quote
Y=2
2 is the Y of the tree.

Quote
MAP=23
23 is the Map of the tree.

Quote
weapon=2
2 is the required weapon number.

Quote
item=3
3 is the item you get if you cutted the tree.

Quote
val=0
0 is the value you get, 0 for non-stackable items, 1 or higher for stackable items.

Change.ini
Quote
2-1=5
2 is the wclv the person needs to be.
1 is the WCSection (The thing from 1 to WCMAX)
5 is the change in percent like 100 (without %). Goes from 0 to 100

max.ini
Quote
WCMAX=2
2 is the max of WCSections.

Quote
maxlv=2
2 is the Max level you can reach in Woodcutting.

Quote
maxexp1=100
1 is the level, if you're lv 1 then you need to get 100 experience.


Function:
Now you can cut wood on some places.


Notes:
- You need to block the tree position.


Mining
Code:

In Sub JoinGame(index) above End Sub add this:
Code: [Select]
If GetVar("Skills\DB.ini","GetPlayerName(index), "Mining") = 0 Then
Call PutVar("Skills\DB.ini","GetPlayerName(index), "MiningExp", 0)
Call PutVar("Skills\DB.ini","GetPlayerName(index), "Mining", 1)
End If

In Sub OnAttack(index) Add under Sub OnAttack(index) if not added:
Code: [Select]
Dim Checked
In Sub OnAttack(index) Add above of End Sub:
Code: [Select]
Checked = CheckIt(index)
If Checked = 1 Then
Call MiningMsg(index, Mine)
End If
End Sub

Add this total down in your main:
Code: [Select]
Sub GiveItem(index, item, value)
SLOT = 1
Do While SLOT < 24
If GetPlayerInvItemNum(index, SLOT) = 0 Then
Call SetPlayerInvItemNum(index, SLOT, item)
Call SetPlayerInvItemValue(index, SLOT, value)
Call SendInventoryUpdate(index, SLOT)
SLOT = 24
End If
SLOT = SLOT+1
Loop
End Sub

Add this total down in your main:
Code: [Select]
Sub CheckIt(index)
Dim MiningSpotX
Dim MiningSpotY
Dim i
Dim memX
Dim MiningSpotM
i = 1
Do While i <= GetVar("Skills\Mining.ini", i ,"items")
MiningSpotX = GetVar("Skills\Mining.ini", i ,"X")
MiningSpotY = GetVar("Skills\Mining.ini", i ,"Y")
MiningSpotM = GetVar("Skills\Mining.ini", i ,"MAP")
memX = i
if GetPlayerMap(index) = MiningSpotM then
if MiningSpotY = Int(GetPlayerY(index) + 1) and MiningSpotX = Int(GetPlayerX(index) + 1) then
CheckIt = 1
i = 21
elseif MiningSpotY = Int(GetPlayerY(index) - 1) and MiningSpotX = Int(GetPlayerX(index) - 1) then
CheckIt = 1
i = 21
elseif MiningSpotY = Int(GetPlayerY(index) + 1) and MiningSpotX = Int(GetPlayerX(index) - 1) then
CheckIt = 1
i = 21
elseif MiningSpotY = Int(GetPlayerY(index) - 1) and MiningSpotX = Int(GetPlayerX(index) + 1) then
CheckIt = 1
i = 21
else
CheckIt = 0
i = Int(memX + 1)
end if
end if
loop
End Sub

Add this total down in your main:
Code: [Select]
Sub MiningMsg(index, stone)
Dim i
Dim Mlv
Dim change
Dim item
Dim val
If stone = 1 Then
If GetPlayerWeapon = GetVar("Skills\Mining.ini", i ,"weapon") Then
Call PlayerMsg(index, "You started with mining some ores", 12)
i = Rand(1, 10000)
Mlv = GetVar("Skills\DB.ini","GetPlayerName(index), "Mining")
change = GetVar("Skills\Change.ini", "Mining", Mlv & "-" & i)
change = mid(change, 1, 3) & "00"
max = GetVar("Skills\max.ini", "Mining", "MMAX")
item = GetVar("Skills\Mining.ini", i ,"item")
val = GetVar("Skills\Mining.ini", i ,"val")
If i >= change Then
Call PlayerMsg(index, "You mining some ores", 12)
Call GiveItem(index, item, val)
Call SetMiningExperience(index, GetVar("Skills\Mining.ini", i ,"exp"))
Else
Call PlayerMsg(index, "You failed with cutting some wood", 12)
End If
End If
End If
End Sub

Add this total down in your main:
Code: [Select]
Sub SetMiningExperience(index, exp)
Dim Mlv
Dim pexp
Dim max
Dim Mmax
Mlv = GetVar("Skills\DB.ini","GetPlayerName(index), "Mining")
Mmax = GetVar("Skills\max.ini", "Mining", "maxlv")
pexp = GetVar("Skills\DB.ini","GetPlayerName(index), "MiningExp")
max = GetVar("Skills\max.ini", "Mining", "maxexp" & Mlv)
if Int(pexp + exp) > max then
if Mlv < maxlv then
Call PutVar("Skills\DB.ini","GetPlayerName(index), "MiningExp", Int(exp - Int(max - pexp)))
Call PutVar("Skills\DB.ini","GetPlayerName(index), "Mining", Int(Mlv + 1))
Call PlayerMsg(index, "You gained a Mining level", 12)
elseif Mlv = maxlv then
Call PutVar("Skills\DB.ini","GetPlayerName(index), "MiningExp", 0)
Call PutVar("Skills\DB.ini","GetPlayerName(index), "Mining", maxlv)
end if
elseif Int(pexp + exp) <= max then
Call PutVar("Skills\DB.ini","GetPlayerName(index), "MiningExp", Int(pexp + exp))
end if
End Sub


INI files:

In map "Skills" on the server create the next files:
Mining.ini
Code: [Select]
[1]
X=2
Y=2
MAP=23
weapon=2
item=3
val=0
[2]
X=5
Y=5
MAP=99
weapon=2
item=45
val=0

Change.ini
Code: [Select]
[Mining]
1-1=2
2-1=5
1-2=0
2-2=4

max.ini
Code: [Select]
[Mining]
MMAX=2
maxlv=2
maxexp1=100
maxexp2=300


INI configuration:

Mining.ini
Quote
[1]
1 is the section of which number goes from 1 to MMAX out max.ini.

Quote
X=2
2 is the X of the rock.

Quote
Y=2
2 is the Y of the rock.

Quote
MAP=23
23 is the Map of the rock.

Quote
weapon=2
2 is the required weapon number.

Quote
item=3
3 is the item you get if you cutted the rock.

Quote
val=0
0 is the value you get, 0 for non-stackable items, 1 or higher for stackable items.

Change.ini
Quote
2-1=5
2 is the Mlv the person needs to be.
1 is the MSection (The thing from 1 to MMAX)
5 is the change in percent like 100 (without %). Goes from 0 to 100

max.ini
Quote
MMAX=2
2 is the max of MSections.

Quote
maxlv=2
2 is the Max level you can reach in Mining.

Quote
maxexp1=100
1 is the level, if you're lv 1 then you need to get 100 experience.


Function:
Now you can mine ores on some places.


Notes:
- You need to block the rock, stone position.


Mining
Code:

In Sub JoinGame(index) above End Sub add this:
Code: [Select]
If GetVar("Skills\DB.ini","GetPlayerName(index), "Mining") = 0 Then
Call PutVar("Skills\DB.ini","GetPlayerName(index), "MiningExp", 0)
Call PutVar("Skills\DB.ini","GetPlayerName(index), "Mining", 1)
End If

In Sub OnAttack(index) Add under Sub OnAttack(index) if not added:
Code: [Select]
Dim Checked
In Sub OnAttack(index) Add above of End Sub:
Code: [Select]
Checked = CheckIt(index)
If Checked = 1 Then
Call FishMsg(index, Checked)
End If
End If

Add this total down in your Main:
Code: [Select]
Sub Giveitem(index, item, value)
SLOT = 1
Do While SLOT < 24
If GetPlayerInvitemNum(index, SLOT) = 0 Then
Call SetPlayerInvitemNum(index, SLOT, item)
Call SetPlayerInvitemValue(index, SLOT, value)
Call SendInventoryUpdate(index, SLOT)
SLOT = 24
End If
SLOT = SLOT+1
Loop
End Sub

Add this total down in your Main:
Code: [Select]
Sub CheckIt(index)
Credits:
The Credits go to me, Godlord.
No posting this script somewhere else without my permission.
Soljah
The Mapper
Global Moderator
Teh Uberleet
*
Offline Offline

Posts: 3,242

Check my Mapping Tut's out!


View Profile WWW Email
« Reply #1 on: January 27, 2007, 06:24:46 PM »

umm wow nice godlord!!
Godlord
Stephanus sum
Veteran
Teh Uberleet
*
Offline Offline

Posts: 4,109


View Profile WWW Email
« Reply #2 on: January 27, 2007, 06:28:39 PM »

Thanks. ;D. Maybe I should use it into my tutorial. lmao.
Godlord
Stephanus sum
Veteran
Teh Uberleet
*
Offline Offline

Posts: 4,109


View Profile WWW Email
« Reply #3 on: January 30, 2007, 10:11:22 AM »

I updated it a little bit... If you want 2 or them all then you need to modify the Sub OnAttack yourself or wait untill I made a section which explains on how to get 2 or more skills in the attack sub...

The next new skill will be Smithing.
Soljah
The Mapper
Global Moderator
Teh Uberleet
*
Offline Offline

Posts: 3,242

Check my Mapping Tut's out!


View Profile WWW Email
« Reply #4 on: January 30, 2007, 02:38:20 PM »

Oooo i cant wait  :blob: :blob:
Anna Comnena
Global Moderator
Teh Uberleet
*
Offline Offline

Posts: 3,000



View Profile Email
« Reply #5 on: January 30, 2007, 02:57:19 PM »

For your OnAttack, is that alot of code to go through every time someone attacks? Why not make another sub, and in OnAttack just have checks to see if the player has a particular item? So like if they have a wood axe, it will detect it and call the woodcutter script?
Godlord
Stephanus sum
Veteran
Teh Uberleet
*
Offline Offline

Posts: 4,109


View Profile WWW Email
« Reply #6 on: January 31, 2007, 04:07:45 AM »

Well I could make them subs, but subs are only needed if you use something to much and in this case I can only put the check X and Y if there is a tree in a sub well I can also add something else in subs well I am going to do it then...
Avon
Member
**
Offline Offline

Posts: 29


View Profile Email
« Reply #7 on: July 27, 2007, 06:23:15 PM »

Eh.. What's "Total Down" mean? lol..
I R nub :D
Brodiaea
"But some emotions don't make a lot of noise. It's hard to hear pride. Caring is real faint - like a heartbeat. And pure love - why, some days it's so quiet, you don't even know it's there."
Member
**
Offline Offline

Posts: 38

Death is like being let out of a cage and into...


View Profile Email
« Reply #8 on: July 27, 2007, 07:26:26 PM »

Eh.. What's "Total Down" mean? lol..
I R nub :D

i think it means at the bottom of the main text...i think.

but man did u check the date before you posted ur post?
jackal27
Tales of Adriana creator
Global Moderator
Advanced Member
*
Offline Offline

Posts: 692



View Profile Email
« Reply #9 on: July 27, 2007, 07:48:18 PM »

You what's cool about necro posting? Yeah... Me neither...
Brodiaea
"But some emotions don't make a lot of noise. It's hard to hear pride. Caring is real faint - like a heartbeat. And pure love - why, some days it's so quiet, you don't even know it's there."
Member
**
Offline Offline

Posts: 38

Death is like being let out of a cage and into...


View Profile Email
« Reply #10 on: July 27, 2007, 07:56:48 PM »

You what's cool about necro posting? Yeah... Me neither...

necro-posting so thats wats it called...
Avon
Member
**
Offline Offline

Posts: 29


View Profile Email
« Reply #11 on: July 27, 2007, 09:58:25 PM »

i think it means at the bottom of the main text...i think.

but man did u check the date before you posted ur post?
No. xD
I just was browsing around and randomly went here and was wondering what that meant.  :P
Jime307
Historium Master Designer
Programmer
Advanced Member
****
Offline Offline

Posts: 540


The King of VB6


View Profile WWW Email
« Reply #12 on: August 25, 2007, 11:17:51 PM »

Fantastic! Thanks!
Bad Name
Newb
*
Offline Offline

Posts: 7


View Profile Email
« Reply #13 on: August 27, 2007, 02:01:06 AM »

Code: [Select]
If GetVar("Skills\DB.ini","GetPlayerName(index), "Woodcutting") = 0 Then
Call PutVar("Skills\DB.ini","GetPlayerName(index), "WoodcuttingExp", 0)
Call PutVar("Skills\DB.ini","GetPlayerName(index), "Woodcutting", 1)
End If

Should be

Code: [Select]
If GetVar("Skills\DB.ini",GetPlayerName(index), "Woodcutting") = 0 Then
Call PutVar("Skills\DB.ini",GetPlayerName(index), "WoodcuttingExp", 0)
Call PutVar("Skills\DB.ini",GetPlayerName(index), "Woodcutting", 1)
End If

No ? You had " at the start of GetPlayerName(Index)

Btw my names Uarepoo2, But the stupid name blocker blocks poo lol
kenny
Eclipse Gfx/scripter
Advanced Eclipser
*****
Offline Offline

Posts: 1,238


~Good Scripter~


View Profile WWW Email
« Reply #14 on: August 27, 2007, 02:06:23 AM »

Lol, nice job of finding that. I wonder if it worked for anyone with that their lol.
1472000
Programmer
Advanced Member
****
Offline Offline

Posts: 557



View Profile Email
« Reply #15 on: August 29, 2007, 06:20:43 PM »

very cool! :D
1472000
Programmer
Advanced Member
****
Offline Offline

Posts: 557



View Profile Email
« Reply #16 on: September 24, 2007, 12:56:31 PM »

does this work for EE?
Seba
Veteran
Advanced Eclipser
*
Offline Offline

Posts: 1,006



View Profile Email
« Reply #17 on: September 24, 2007, 01:06:11 PM »

Necro post Don't do it
kenny
Eclipse Gfx/scripter
Advanced Eclipser
*****
Offline Offline

Posts: 1,238


~Good Scripter~


View Profile WWW Email
« Reply #18 on: September 25, 2007, 04:57:06 AM »

This should be a fully working version of the script, all 3 subs in their dont get error from Demon X's script editor.

Code: [Select]
Sub SetWoodcuttingExperience(index, exp)
Dim wclv
Dim pexp
Dim max
Dim wcmax
wclv = GetVar("\Skills\DB.ini", GetPlayerName(index), "Woodcutting")
wcmax = GetVar("\Skills\max.ini", "Woodcutting", "maxlv")
pexp = GetVar("\Skills\DB.ini", GetPlayerName(index), "WoodcuttingExp")
max = GetVar("\Skills\max.ini", "Woodcutting", "maxexp" & wclv)
If Int(pexp + exp) > max Then
If wclv < maxlv Then
Call PutVar("\Skills\DB.ini", GetPlayerName(index), "WoodcuttingExp", Int(exp - Int(max - pexp)))
Call PutVar("\Skills\DB.ini", GetPlayerName(index), "Woodcutting", Int(wclv + 1))
Call PlayerMsg(index, "You gained a woodcutting level", 12)
ElseIf wclv = maxlv Then
Call PutVar("\Skills\DB.ini", GetPlayerName(index), "WoodcuttingExp", 0)
Call PutVar("\Skills\DB.ini", GetPlayerName(index), "Woodcutting", maxlv)
End If
ElseIf Int(pexp + exp) <= max Then
Call PutVar("\Skills\DB.ini", GetPlayerName(index), "WoodcuttingExp", Int(pexp + exp))
End If
End Sub

Sub CheckIt(index)
Dim WoodcuttingSpotX
Dim WoodcuttingSpotY
Dim i
Dim memX
Dim Fish
Dim WoodcuttingSpotM
i = 1
Do While i <= GetVar("Skills\Woodcutting.ini", i ,"items")
WoodcuttingSpotX = GetVar("Skills\Woodcutting.ini", i ,"X")
WoodcuttingSpotY = GetVar("Skills\Woodcutting.ini", i ,"Y")
WoodcuttingSpotM = GetVar("Skills\Woodcutting.ini", i ,"MAP")
memX = i
If GetPlayerMap(index) = WoodcuttingSpotM Then
If WoodcuttingSpotY = Int(GetPlayerY(index) + 1) And WoodcuttingSpotX = Int(GetPlayerX(index) + 1) Then
CheckIt = 1
i = 21
ElseIf WoodcuttingSpotY = Int(GetPlayerY(index) - 1) And WoodcuttingSpotX = Int(GetPlayerX(index) - 1) Then
CheckIt = 1
i = 21
ElseIf WoodcuttingSpotY = Int(GetPlayerY(index) + 1) And WoodcuttingSpotX = Int(GetPlayerX(index) - 1) Then
CheckIt = 1
i = 21
ElseIf WoodcuttingSpotY = Int(GetPlayerY(index) - 1) And WoodcuttingSpotX = Int(GetPlayerX(index) + 1) Then
CheckIt = 1
i = 21
Else
CheckIt = 0
i = Int(memX + 1)
End If
End If
Loop
End Sub           

Sub WoodcuttingMsg(index, wood)
Dim wclv
Dim change
Dim item
Dim val
Dim i
If wood = 1 Then
If GetPlayerWeapon = GetVar("\Skills\Woodcutting.ini", i ,"weapon") Then
Call PlayerMsg(index, "You started with cutting some wood", 12)
i = Rand(1, 10000)
wclv = GetVar("\Skills\DB.ini",GetPlayerName(index), "Woodcutting")
change = GetVar("\Skills\Change.ini", "Woodcutting", wclv & "-" & i)
change = mid(change, 1, 3) & "00"
max = GetVar("\Skills\max.ini", "Woodcutting", "WCMAX")
item = GetVar("\Skills\Woodcutting.ini", i ,"item")
val = GetVar("\Skills\Woodcutting.ini", i ,"val")
If i >= change Then
Call PlayerMsg(index, "You cutted some wood", 12)
Call GiveItem(index, item, val)
Call SetWoodcuttingExperience(index, GetVar("\Skills\Woodcutting.ini", i ,"exp"))
Else
Call PlayerMsg(index, "You failed with cutting some wood", 12)
End If
End If
End If
End Sub
Jayce Atkins
Member
**
Offline Offline

Posts: 51


View Profile Email
« Reply #19 on: October 02, 2007, 08:55:04 AM »

I think i've tried everything that is in the post to get this script to work, but I can't seem to get it. Anybody think they could assist me, if you could I would appreciate it. Please message me.