wooo-10
17th February 2006, 11:49
sorry about this thread but i've search every where and i found many pluins about pktele but i dont know how to work it!!!! heres my CONFIG AND PKTELE plugin...... PLS reply if i have something missing or wrong in my .txt!!
your help will be highly appreciated....
CONFIG.....
# See the documentation for what these variables do.
# New variables have comments above them.
######## Login options and server-specific options ########
master paradisero Private Server
server 0
username
password
char 2
sex 1
bindIp
encrypt 0
# 0 = normal server, 1 = oRO, 2 = pRO, 3 = eAthena/Freya, 4 = new Freya
serverType 0
XKore 0
XKore_silent 1
exeName ragexe.exe
commandPrefix ;
pauseMapServer 0
ignoreInvalidLogin 0
secureLogin_requestCode
message_length_max 80
# If you play oRO or euRO, you should set chatLangCode to 1
chatLangCode 0
storageEncryptKey
gameGuard 0
######## Main configuration ########
alias_heal sp 28
allowedMaps
allowedMaps_reaction 1
attackAuto 2
attackAuto_party 1
attackAuto_onlyWhenSafe 0
attackAuto_followTarget 1
attackAuto_inLockOnly 1
attackDistance 1.5
attackDistanceAuto 0
attackMaxDistance 2.5
attackMaxRouteDistance 100
attackMaxRouteTime 4
attackMinPlayerDistance 2
attackMinPortalDistance 4
attackUseWeapon 1
attackNoGiveup 0
attackCanSnipe 0
attackCheckLOS 0
autoBreakTime {
startTime
stopTime
}
autoConfChange {
minTime
varTime
lvl
joblvl
}
autoMakeArrows 0
autoRestart 0
autoRestartMin 10800
autoRestartSeed 3600
autoRestartSleep 1
autoSleepMin 900
autoSleepSeed 900
autoResponse 0
autoSpell
avoidGM_near 0
avoidGM_near_inTown 0
avoidGM_talk 0
avoidGM_reconnect 1800
avoid_ignore_0
avoidList 1
avoidList_inLockOnly 0
avoidList_reconnect 1800
dcOnDeath 0
dcOnDualLogin 0
dcOnDisconnect 0
dcOnEmptyArrow 0
dcOnMute 0
dcOnPM 0
dcOnZeny 0
follow 0
followTarget
followEmotion 1
followEmotion_distance 4
followFaceDirection 0
followDistanceMax 6
followDistanceMin 3
followLostStep 12
followSitAuto 0
followBot 0
itemsTakeAuto 2
itemsTakeAuto_party 0
itemsGatherAuto 2
itemsMaxWeight 89
itemsMaxWeight_sellOrStore 48
lockMap alde_dun02
lockMap_x
lockMap_y
lockMap_randX
lockMap_randY
route_randomWalk 1
route_randomWalk_maxRouteTime 75
route_maxWarpFee
route_teleport 0
route_teleport_minDistance 150
route_teleport_maxTries 8
route_teleport_notInMaps
route_step 15
runFromTarget 0
runFromTarget_dist 6
saveMap
saveMap_warpToBuyOrSell 1
shopAuto_open 0
shop_random 0
sitAuto_hp_lower 40
sitAuto_hp_upper 100
sitAuto_sp_lower 0
sitAuto_sp_upper 0
sitAuto_over_50 0
sitAuto_idle 1
statsAddAuto 0
statsAddAuto_list
statsAddAuto_dontUseBonus 0
skillsAddAuto 0
skillsAddAuto_list
tankMode 0
tankModeTarget
teleportAuto_hp 40
teleportAuto_sp 0
teleportAuto_idle 0
teleportAuto_portal 0
teleportAuto_search 0
teleportAuto_minAggressives 0
teleportAuto_minAggressivesInLock 7
teleportAuto_onlyWhenSafe 0
teleportAuto_maxDmg 500
teleportAuto_maxDmgInLock 0
teleportAuto_deadly 1
teleportAuto_useSkill 3
teleportAuto_emptyName 1
teleportAuto_allPlayers 0
teleportAuto_atkCount 0
teleportAuto_atkMiss 10
teleportAuto_unstuck 0
teleportAuto_dropTarget 0
teleportAuto_attackedWhenSitting 0
teleportAuto_totalDmg 0
teleportAuto_totalDmgInLock 0
pkTele_exceptions Heal,Blessing,Increase AGI,Status Recovery,Impositio Manus,Resurrection,Cure
dealAuto 1
partyAuto 1
partyAutoShare 0
guildAutoDeny 1
verbose 1
showDomain 0
squelchDomains
verboseDomains
beepDomains
beepDomains_notInTown
logChat 0
logPrivateChat 1
logPartyChat 1
logGuildChat 1
logSystemChat 1
logEmoticons
chatTitleOversize 0
shopTitleOversize 0
sleepTime 10000
intervalMapDrt 1
ignoreAll 0
itemHistory 0
autoTalkCont 1
noAutoSkill 0
portalRecord 2
missDamage 0
tankersList
secureAdminPassword 0
adminPassword saubrevo
callSign
######## Block options ########
# You can copy & paste any block multiple times. So if you want to
# configure two attack skills, just duplicate the attackSkillSlot block.
attackSkillSlot {
lvl 10
dist 1.5
maxCastTime 0
minCastTime 0
hp
sp > 10
onAction
whenStatusActive
whenStatusInactive
whenFollowing
spirit
aggressives
previousDamage
stopWhenHit 0
inLockOnly 0
notInTown 0
timeout 0
disabled 0
monsters
notMonsters
maxAttempts 0
maxUses 0
target_whenStatusActive
target_whenStatusInactive
inInventory
}
attackComboSlot {
afterSkill
waitBeforeUse
dist 1.5
isSelfSkill 1
}
useSelf_skill {
lvl 10
maxCastTime 0
minCastTime 0
hp
sp
onAction
whenStatusActive
whenStatusInactive
whenFollowing
spirit
aggressives
monsters
notMonsters
stopWhenHit 0
inLockOnly 0
notWhileSitting 0
notInTown 0
timeout 0
disabled 0
inInventory
}
useSelf_skill_smartHeal 1
partySkill {
lvl 10
maxCastTime 0
minCastTime 0
hp
sp
onAction
whenStatusActive
whenStatusInactive
whenFollowing
spirit
aggressives
monsters
notMonsters
stopWhenHit 0
inLockOnly 0
notWhileSitting 0
notInTown 0
timeout 0
disabled 0
target
target_hp
target_isJob
target_isNotJob
target_whenStatusActive
target_whenStatusInactive
target_aggressives
target_monsters
target_timeout 0
target_dead 0
inInventory
}
autoSwitch_default_rightHand
autoSwitch_default_leftHand
autoSwitch_default_arrow
# NOTE: In the case of two handed weapons, or no Shield,
# duplicate the weapon name for 'rightHand'
# To attack with bare hands, specify "[NONE]" (without the quotes) for rightHand
autoSwitch {
rightHand
leftHand
arrow
distance
useWeapon
}
equipAuto {
def
monsters
skills
weight 0
whileSitting 0
onTeleport 0
hp
sp
onAction
whenStatusActive
whenStatusInactive
whenFollowing
spirit
aggressives
stopWhenHit 0
inLockOnly 0
notWhileSitting 0
notInTown 0
timeout 0
disabled 0
inInventory
}
useSelf_item Meat,Apple,Banana,Sweet Potato,Carrot,Red Potion {
hp <= 50
sp
onAction
whenStatusActive
whenStatusInactive
whenFollowing
spirit
aggressives
monsters
notMonsters
stopWhenHit 0
inLockOnly 0
notWhileSitting 0
notInTown 0
timeout
disabled 0
inInventory
}
######## Autostorage/autosell ########
buyAuto {
npc
standpoint
distance 5
minAmount 2
maxAmount 3
}
sellAuto 0
sellAuto_npc
sellAuto_standpoint
sellAuto_distance 5
storageAuto 0
storageAuto_npc
storageAuto_distance 5
storageAuto_npc_type 1
storageAuto_npc_steps
relogAfterStorage 1
storageAuto_password
getAuto {
minAmount
maxAmount
passive
}
######## Debugging options; only useful for developers ########
debug 0
debugPacket_unparsed 0
debugPacket_received 0
debugPacket_ro_sent 0
debugPacket_sent 0
debugPacket_exclude
debugDomains
OHH and heres my pk tele plugin!!!!!
package PKTele;
use strict;
use Time::HiRes qw(time);
use Globals;
use Plugins;
use Utils;
use Network::Send;
use Log qw(debug message warning error);
Plugins::register('PKTele', 'teleport from PK', \&onUnload);
my $hooks = Plugins::addHooks(
['is_casting', \&hookAvoidSkill, undef],
['packet_skilluse', \&hookAvoidSkill, undef],
['parseMsg/pre', \&hookAttack, undef]
);
sub onUnload {
Plugins::delHooks($hooks);
}
sub hookAvoidSkill {
return if ($char->{lv} < 51);
my $hookName = shift;
my $args = shift;
my $sourceID = $args->{sourceID};
my $targetID = $args->{targetID};
my $skillID = $args->{skillID};
if ($targetID eq $accountID &&
$sourceID ne $accountID &&
!$monsters{$sourceID}) {
my $skill = new Skills(id => $skillID);
if (!existsInList($config{pkTele_exceptions},$skill->name)) {
main::useTeleport(1);
}
}
}
sub hookAttack {
return if ($char->{lv} < 51);
my $hookName = shift;
my $args = shift;
my $switch = $args->{switch};
my $msg = $args->{msg};
if ($switch eq "008A") {
# Attack
my ($ID1, $ID2, $tick, $src_speed, $dst_speed, $damage, $param2, $type, $param3) = unpack("x2 a4 a4 a4 L1 L1 s1 S1 C1 S1", $msg);
if ($type == 1) {
# Take item
} elsif ($type == 2) {
# Sit
} elsif ($type == 3) {
# Stand
} else {
# Attack
if ($ID2 eq $accountID &&
!$monsters{$ID1}) {
main::useTeleport(1);
}
}
}
}
return 1;
your help will be highly appreciated....
CONFIG.....
# See the documentation for what these variables do.
# New variables have comments above them.
######## Login options and server-specific options ########
master paradisero Private Server
server 0
username
password
char 2
sex 1
bindIp
encrypt 0
# 0 = normal server, 1 = oRO, 2 = pRO, 3 = eAthena/Freya, 4 = new Freya
serverType 0
XKore 0
XKore_silent 1
exeName ragexe.exe
commandPrefix ;
pauseMapServer 0
ignoreInvalidLogin 0
secureLogin_requestCode
message_length_max 80
# If you play oRO or euRO, you should set chatLangCode to 1
chatLangCode 0
storageEncryptKey
gameGuard 0
######## Main configuration ########
alias_heal sp 28
allowedMaps
allowedMaps_reaction 1
attackAuto 2
attackAuto_party 1
attackAuto_onlyWhenSafe 0
attackAuto_followTarget 1
attackAuto_inLockOnly 1
attackDistance 1.5
attackDistanceAuto 0
attackMaxDistance 2.5
attackMaxRouteDistance 100
attackMaxRouteTime 4
attackMinPlayerDistance 2
attackMinPortalDistance 4
attackUseWeapon 1
attackNoGiveup 0
attackCanSnipe 0
attackCheckLOS 0
autoBreakTime {
startTime
stopTime
}
autoConfChange {
minTime
varTime
lvl
joblvl
}
autoMakeArrows 0
autoRestart 0
autoRestartMin 10800
autoRestartSeed 3600
autoRestartSleep 1
autoSleepMin 900
autoSleepSeed 900
autoResponse 0
autoSpell
avoidGM_near 0
avoidGM_near_inTown 0
avoidGM_talk 0
avoidGM_reconnect 1800
avoid_ignore_0
avoidList 1
avoidList_inLockOnly 0
avoidList_reconnect 1800
dcOnDeath 0
dcOnDualLogin 0
dcOnDisconnect 0
dcOnEmptyArrow 0
dcOnMute 0
dcOnPM 0
dcOnZeny 0
follow 0
followTarget
followEmotion 1
followEmotion_distance 4
followFaceDirection 0
followDistanceMax 6
followDistanceMin 3
followLostStep 12
followSitAuto 0
followBot 0
itemsTakeAuto 2
itemsTakeAuto_party 0
itemsGatherAuto 2
itemsMaxWeight 89
itemsMaxWeight_sellOrStore 48
lockMap alde_dun02
lockMap_x
lockMap_y
lockMap_randX
lockMap_randY
route_randomWalk 1
route_randomWalk_maxRouteTime 75
route_maxWarpFee
route_teleport 0
route_teleport_minDistance 150
route_teleport_maxTries 8
route_teleport_notInMaps
route_step 15
runFromTarget 0
runFromTarget_dist 6
saveMap
saveMap_warpToBuyOrSell 1
shopAuto_open 0
shop_random 0
sitAuto_hp_lower 40
sitAuto_hp_upper 100
sitAuto_sp_lower 0
sitAuto_sp_upper 0
sitAuto_over_50 0
sitAuto_idle 1
statsAddAuto 0
statsAddAuto_list
statsAddAuto_dontUseBonus 0
skillsAddAuto 0
skillsAddAuto_list
tankMode 0
tankModeTarget
teleportAuto_hp 40
teleportAuto_sp 0
teleportAuto_idle 0
teleportAuto_portal 0
teleportAuto_search 0
teleportAuto_minAggressives 0
teleportAuto_minAggressivesInLock 7
teleportAuto_onlyWhenSafe 0
teleportAuto_maxDmg 500
teleportAuto_maxDmgInLock 0
teleportAuto_deadly 1
teleportAuto_useSkill 3
teleportAuto_emptyName 1
teleportAuto_allPlayers 0
teleportAuto_atkCount 0
teleportAuto_atkMiss 10
teleportAuto_unstuck 0
teleportAuto_dropTarget 0
teleportAuto_attackedWhenSitting 0
teleportAuto_totalDmg 0
teleportAuto_totalDmgInLock 0
pkTele_exceptions Heal,Blessing,Increase AGI,Status Recovery,Impositio Manus,Resurrection,Cure
dealAuto 1
partyAuto 1
partyAutoShare 0
guildAutoDeny 1
verbose 1
showDomain 0
squelchDomains
verboseDomains
beepDomains
beepDomains_notInTown
logChat 0
logPrivateChat 1
logPartyChat 1
logGuildChat 1
logSystemChat 1
logEmoticons
chatTitleOversize 0
shopTitleOversize 0
sleepTime 10000
intervalMapDrt 1
ignoreAll 0
itemHistory 0
autoTalkCont 1
noAutoSkill 0
portalRecord 2
missDamage 0
tankersList
secureAdminPassword 0
adminPassword saubrevo
callSign
######## Block options ########
# You can copy & paste any block multiple times. So if you want to
# configure two attack skills, just duplicate the attackSkillSlot block.
attackSkillSlot {
lvl 10
dist 1.5
maxCastTime 0
minCastTime 0
hp
sp > 10
onAction
whenStatusActive
whenStatusInactive
whenFollowing
spirit
aggressives
previousDamage
stopWhenHit 0
inLockOnly 0
notInTown 0
timeout 0
disabled 0
monsters
notMonsters
maxAttempts 0
maxUses 0
target_whenStatusActive
target_whenStatusInactive
inInventory
}
attackComboSlot {
afterSkill
waitBeforeUse
dist 1.5
isSelfSkill 1
}
useSelf_skill {
lvl 10
maxCastTime 0
minCastTime 0
hp
sp
onAction
whenStatusActive
whenStatusInactive
whenFollowing
spirit
aggressives
monsters
notMonsters
stopWhenHit 0
inLockOnly 0
notWhileSitting 0
notInTown 0
timeout 0
disabled 0
inInventory
}
useSelf_skill_smartHeal 1
partySkill {
lvl 10
maxCastTime 0
minCastTime 0
hp
sp
onAction
whenStatusActive
whenStatusInactive
whenFollowing
spirit
aggressives
monsters
notMonsters
stopWhenHit 0
inLockOnly 0
notWhileSitting 0
notInTown 0
timeout 0
disabled 0
target
target_hp
target_isJob
target_isNotJob
target_whenStatusActive
target_whenStatusInactive
target_aggressives
target_monsters
target_timeout 0
target_dead 0
inInventory
}
autoSwitch_default_rightHand
autoSwitch_default_leftHand
autoSwitch_default_arrow
# NOTE: In the case of two handed weapons, or no Shield,
# duplicate the weapon name for 'rightHand'
# To attack with bare hands, specify "[NONE]" (without the quotes) for rightHand
autoSwitch {
rightHand
leftHand
arrow
distance
useWeapon
}
equipAuto {
def
monsters
skills
weight 0
whileSitting 0
onTeleport 0
hp
sp
onAction
whenStatusActive
whenStatusInactive
whenFollowing
spirit
aggressives
stopWhenHit 0
inLockOnly 0
notWhileSitting 0
notInTown 0
timeout 0
disabled 0
inInventory
}
useSelf_item Meat,Apple,Banana,Sweet Potato,Carrot,Red Potion {
hp <= 50
sp
onAction
whenStatusActive
whenStatusInactive
whenFollowing
spirit
aggressives
monsters
notMonsters
stopWhenHit 0
inLockOnly 0
notWhileSitting 0
notInTown 0
timeout
disabled 0
inInventory
}
######## Autostorage/autosell ########
buyAuto {
npc
standpoint
distance 5
minAmount 2
maxAmount 3
}
sellAuto 0
sellAuto_npc
sellAuto_standpoint
sellAuto_distance 5
storageAuto 0
storageAuto_npc
storageAuto_distance 5
storageAuto_npc_type 1
storageAuto_npc_steps
relogAfterStorage 1
storageAuto_password
getAuto {
minAmount
maxAmount
passive
}
######## Debugging options; only useful for developers ########
debug 0
debugPacket_unparsed 0
debugPacket_received 0
debugPacket_ro_sent 0
debugPacket_sent 0
debugPacket_exclude
debugDomains
OHH and heres my pk tele plugin!!!!!
package PKTele;
use strict;
use Time::HiRes qw(time);
use Globals;
use Plugins;
use Utils;
use Network::Send;
use Log qw(debug message warning error);
Plugins::register('PKTele', 'teleport from PK', \&onUnload);
my $hooks = Plugins::addHooks(
['is_casting', \&hookAvoidSkill, undef],
['packet_skilluse', \&hookAvoidSkill, undef],
['parseMsg/pre', \&hookAttack, undef]
);
sub onUnload {
Plugins::delHooks($hooks);
}
sub hookAvoidSkill {
return if ($char->{lv} < 51);
my $hookName = shift;
my $args = shift;
my $sourceID = $args->{sourceID};
my $targetID = $args->{targetID};
my $skillID = $args->{skillID};
if ($targetID eq $accountID &&
$sourceID ne $accountID &&
!$monsters{$sourceID}) {
my $skill = new Skills(id => $skillID);
if (!existsInList($config{pkTele_exceptions},$skill->name)) {
main::useTeleport(1);
}
}
}
sub hookAttack {
return if ($char->{lv} < 51);
my $hookName = shift;
my $args = shift;
my $switch = $args->{switch};
my $msg = $args->{msg};
if ($switch eq "008A") {
# Attack
my ($ID1, $ID2, $tick, $src_speed, $dst_speed, $damage, $param2, $type, $param3) = unpack("x2 a4 a4 a4 L1 L1 s1 S1 C1 S1", $msg);
if ($type == 1) {
# Take item
} elsif ($type == 2) {
# Sit
} elsif ($type == 3) {
# Stand
} else {
# Attack
if ($ID2 eq $accountID &&
!$monsters{$ID1}) {
main::useTeleport(1);
}
}
}
}
return 1;