Exemplo n.º 1
0
def doCut(player, name, objID, x, y):
	level = player.playerLevel[8]
	if name == "TREE":
		player.sendMessage("You swing your axe at the tree...")
		player.setAnimation(867)
		TaskManager.registerClientTask(TaskFactory.getDelayedTask("callback_woodcutting_TREE", player, objID, x, y), random.randrange(1, 4))
	elif name == "OAK":
		if level >= 15:
			player.sendMessage("You swing your axe at the tree...")
			player.setAnimation(867)
			TaskManager.registerClientTask(TaskFactory.getDelayedTask("callback_woodcutting_OAK", player, objID, x, y), random.randrange(3, 6))
		else:
			player.sendMessage("You need a woodcutting level of 15 to cut this tree.")
	elif name == "WILLOW":
		if level >= 30:
			player.sendMessage("You swing your axe at the tree...")
			player.setAnimation(867)
			TaskManager.registerClientTask(TaskFactory.getDelayedTask("callback_woodcutting_WILLOW", player, objID, x, y), random.randrange(3, 8))
		else:
			player.sendMessage("You need a woodcutting level of 30 to cut this tree.")
	elif name == "YEW":
		if level >= 60:
			player.sendMessage("You swing your axe at the tree...")
			player.setAnimation(867)
			TaskManager.registerClientTask(TaskFactory.getDelayedTask("callback_woodcutting_YEW", player, objID, x, y), random.randrange(3, 12))
		else:
			player.sendMessage("You need a woodcutting level of 60 to cut this tree.")
Exemplo n.º 2
0
def doMine(player, name, objID, x, y):
	level = player.playerLevel[14]
	if name == "COPPER":
		player.sendMessage("You swing your pickaxe at the rock...")
		player.setAnimation(0x554)
		TaskManager.registerClientTask(TaskFactory.getDelayedTask("callback_mining_COPPER", player, objID, x, y), random.randrange(1, 4))
	elif name == "TIN":
		player.sendMessage("Your swing your pickaxe at the rock...")
		player.setAnimation(0x554)
		TaskManager.registerClientTask(TaskFactory.getDelayedTask("callback_mining_TIN", player, objID, x, y), random.randrange(1, 4))
	elif name == "IRON":
		if level >= 15:
			player.sendMessage("You swing your pickaxe at the rock...")
			player.setAnimation(0x554)
			TaskManager.registerClientTask(TaskFactory.getDelayedTask("callback_mining_IRON", player, objID, x, y), random.randrange(3, 6))
		else:
			player.sendMessage("You need a mining level of 15 to mine this rock.")
	elif name == "SILVER":
		if level >= 20:
			player.sendMessage("You swing your pickaxe at the rock...")
			player.setAnimation(0x554)
			TaskManager.registerClientTask(TaskFactory.getDelayedTask("callback_mining_SILVER", player, objID, x, y), random.randrange(4, 6))
		else:
			player.sendMessage("You need a mining level of 20 to mine this rock.")
	elif name == "COAL":
		if level >= 30:
			player.sendMessage("You swing your pickaxe at the rock...")
			player.setAnimation(0x554)
			TaskManager.registerClientTask(TaskFactory.getDelayedTask("callback_mining_COAL", player, objID, x, y), random.randrange(4, 9))
		else:
			player.sendMessage("You need a mining level of 30 to mine this rock.")
	elif name == "GOLD":
		if level >= 40:
			player.sendMessage("You swing your pickaxe at the rock...")
			player.setAnimation(0x554)
			TaskManager.registerClientTask(TaskFactory.getDelayedTask("callback_mining_GOLD", player, objID, x, y), random.randrange(5, 9))
		else:
			player.sendMessage("You need a mining level of 40 to mine this rock.")
	elif name == "MITHRIL":
		if level >= 55:
			player.sendMessage("You swing your pickaxe at the rock...")
			player.setAnimation(0x554)
			TaskManager.registerClientTask(TaskFactory.getDelayedTask("callback_mining_MITHRIL", player, objID, x, y), random.randrange(5, 13))
		else:
			player.sendMessage("You need a mining level of 55 to mine this rock...")
	elif name == "ADAMANT":
		if level >= 70:
			player.sendMessage("You swing your pickaxe at the rock...")
			player.setAnimation(0x554)
			TaskManager.registerClientTask(TaskFactory.getDelayedTask("callback_mining_ADAMANT", player, objID, x, y), random.randrange(8, 18))
		else:
			player.sendMessage("You need a mining level of 70 to mine this rock.")
	elif name == "RUNITE":
		if level >= 85:
			player.sendMessage("You swing your pickaxe at the rock...")
			player.setAnimation(0x554)
			TaskManager.registerClientTask(TaskFactory.getDelayedTask("callback_mining_RUNITE", player, objID, x, y), random.randrange(16, 32))
		else:
			player.sendMessage("You need a mining level of 85 to mine this rock.")
Exemplo n.º 3
0
def callback_mining_ADAMANT(player, id, x, y):
	player.sendMessage("You get some adamantite ore.")
	player.addItem(449, 1)
	player.addSkillXP(95, 14)
	player.resetAnimation()
	PlayerManager.replaceObjectGlobal(x, y, 450, 0, 10)
	TaskManager.registerClientTask(TaskFactory.getDelayedGlobalTask("callback_mining_replace", id, x, y), 336)
Exemplo n.º 4
0
def callback_mining_MITHRIL(player, id, x, y):
	player.sendMessage("You get some mithril ore.")
	player.addItem(447, 1)
	player.addSkillXP(80, 14)
	player.resetAnimation()
	PlayerManager.replaceObjectGlobal(x, y, 450, 0, 10)
	TaskManager.registerClientTask(TaskFactory.getDelayedGlobalTask("callback_mining_replace", id, x, y), 168)
Exemplo n.º 5
0
def callback_mining_GOLD(player, id, x, y):
	player.sendMessage("You get some gold ore.")
	player.addItem(444, 1)
	player.addSkillXP(65, 14)
	player.resetAnimation()
	PlayerManager.replaceObjectGlobal(x, y, 450, 0, 10)
	TaskManager.registerClientTask(TaskFactory.getDelayedGlobalTask("callback_mining_replace", id, x, y), 84)
Exemplo n.º 6
0
def callback_mining_COAL(player, id, x, y):
	player.sendMessage("You get some coal.")
	player.addItem(453, 1)
	player.addSkillXP(50, 14)
	player.resetAnimation()
	PlayerManager.replaceObjectGlobal(x, y, 450, 0, 10)
	TaskManager.registerClientTask(TaskFactory.getDelayedGlobalTask("callback_mining_replace", id, x, y), 42)
Exemplo n.º 7
0
def callback_mining_RUNITE(player, id, x, y):
	player.sendMessage("You get some runite ore.")
	player.addItem(451, 1)
	player.addSkillXP(125, 14)
	player.resetAnimation()
	PlayerManager.replaceObjectGlobal(x, y, 450, 0, 10)
	TaskManager.registerClientTask(TaskFactory.getDelayedGlobalTask("callback_mining_replace", id, x, y), 1050)
Exemplo n.º 8
0
def callback_mining_RUNITE(player, id, x, y):
    player.sendMessage("You get some runite ore.")
    player.addItem(451, 1)
    player.addSkillXP(125, 14)
    player.resetAnimation()
    PlayerManager.replaceObjectGlobal(x, y, 450, 0, 10)
    TaskManager.registerClientTask(
        TaskFactory.getDelayedGlobalTask("callback_mining_replace", id, x, y),
        1050)
Exemplo n.º 9
0
def callback_mining_MITHRIL(player, id, x, y):
    player.sendMessage("You get some mithril ore.")
    player.addItem(447, 1)
    player.addSkillXP(80, 14)
    player.resetAnimation()
    PlayerManager.replaceObjectGlobal(x, y, 450, 0, 10)
    TaskManager.registerClientTask(
        TaskFactory.getDelayedGlobalTask("callback_mining_replace", id, x, y),
        168)
Exemplo n.º 10
0
def callback_mining_ADAMANT(player, id, x, y):
    player.sendMessage("You get some adamantite ore.")
    player.addItem(449, 1)
    player.addSkillXP(95, 14)
    player.resetAnimation()
    PlayerManager.replaceObjectGlobal(x, y, 450, 0, 10)
    TaskManager.registerClientTask(
        TaskFactory.getDelayedGlobalTask("callback_mining_replace", id, x, y),
        336)
Exemplo n.º 11
0
def callback_mining_COAL(player, id, x, y):
    player.sendMessage("You get some coal.")
    player.addItem(453, 1)
    player.addSkillXP(50, 14)
    player.resetAnimation()
    PlayerManager.replaceObjectGlobal(x, y, 450, 0, 10)
    TaskManager.registerClientTask(
        TaskFactory.getDelayedGlobalTask("callback_mining_replace", id, x, y),
        42)
Exemplo n.º 12
0
def callback_mining_GOLD(player, id, x, y):
    player.sendMessage("You get some gold ore.")
    player.addItem(444, 1)
    player.addSkillXP(65, 14)
    player.resetAnimation()
    PlayerManager.replaceObjectGlobal(x, y, 450, 0, 10)
    TaskManager.registerClientTask(
        TaskFactory.getDelayedGlobalTask("callback_mining_replace", id, x, y),
        84)
Exemplo n.º 13
0
def callback_woodcutting_TREE(player, id, x, y):
	player.sendMessage("You get some logs.")
	player.addItem(1511, 1)
	player.addSkillXP(50, 8)
	if random.randrange(1 , 2) == 1:
		player.resetAnimation()
		PlayerManager.replaceObjectGlobal(x, y, 1341, 0, 10)
		TaskManager.registerClientTask(TaskFactory.getDelayedGlobalTask("callback_woodcutting_replace", id, x, y), 3)
	else:
		doAxeCheck(player, "TREE", id, x, y)
Exemplo n.º 14
0
def callback_woodcutting_YEW(player, id, x, y):
	player.sendMessage("You get some willow logs.")
	player.addItem(1515, 1)
	player.addSkillXP(350, 8)
	if Misc.random(6) == 1:
		player.resetAnimation()
		PlayerManager.replaceObjectGlobal(x, y, 1341, 0, 10)
		TaskManager.registerClientTask(TaskFactory.getDelayedGlobalTask("callback_woodcutting_replace", id, x, y), 8)
	else:
		doAxeCheck(player, "YEW", id, x, y)
Exemplo n.º 15
0
def doCut(player, name, objID, x, y):
    level = player.playerLevel[8]
    if name == "TREE":
        player.sendMessage("You swing your axe at the tree...")
        player.setAnimation(867)
        TaskManager.registerClientTask(
            TaskFactory.getDelayedTask("callback_woodcutting_TREE", player,
                                       objID, x, y), random.randrange(1, 4))
    elif name == "OAK":
        if level >= 15:
            player.sendMessage("You swing your axe at the tree...")
            player.setAnimation(867)
            TaskManager.registerClientTask(
                TaskFactory.getDelayedTask("callback_woodcutting_OAK",
                                           player, objID, x, y),
                random.randrange(3, 6))
        else:
            player.sendMessage(
                "You need a woodcutting level of 15 to cut this tree.")
    elif name == "WILLOW":
        if level >= 30:
            player.sendMessage("You swing your axe at the tree...")
            player.setAnimation(867)
            TaskManager.registerClientTask(
                TaskFactory.getDelayedTask("callback_woodcutting_WILLOW",
                                           player, objID, x, y),
                random.randrange(3, 8))
        else:
            player.sendMessage(
                "You need a woodcutting level of 30 to cut this tree.")
    elif name == "YEW":
        if level >= 60:
            player.sendMessage("You swing your axe at the tree...")
            player.setAnimation(867)
            TaskManager.registerClientTask(
                TaskFactory.getDelayedTask("callback_woodcutting_YEW",
                                           player, objID, x, y),
                random.randrange(3, 12))
        else:
            player.sendMessage(
                "You need a woodcutting level of 60 to cut this tree.")
Exemplo n.º 16
0
def callback_woodcutting_YEW(player, id, x, y):
    player.sendMessage("You get some willow logs.")
    player.addItem(1515, 1)
    player.addSkillXP(350, 8)
    if Misc.random(6) == 1:
        player.resetAnimation()
        PlayerManager.replaceObjectGlobal(x, y, 1341, 0, 10)
        TaskManager.registerClientTask(
            TaskFactory.getDelayedGlobalTask("callback_woodcutting_replace",
                                             id, x, y), 8)
    else:
        doAxeCheck(player, "YEW", id, x, y)
Exemplo n.º 17
0
def callback_woodcutting_TREE(player, id, x, y):
    player.sendMessage("You get some logs.")
    player.addItem(1511, 1)
    player.addSkillXP(50, 8)
    if random.randrange(1, 2) == 1:
        player.resetAnimation()
        PlayerManager.replaceObjectGlobal(x, y, 1341, 0, 10)
        TaskManager.registerClientTask(
            TaskFactory.getDelayedGlobalTask("callback_woodcutting_replace",
                                             id, x, y), 3)
    else:
        doAxeCheck(player, "TREE", id, x, y)
Exemplo n.º 18
0
def doMine(player, name, objID, x, y):
    level = player.playerLevel[14]
    if name == "COPPER":
        player.sendMessage("You swing your pickaxe at the rock...")
        player.setAnimation(0x554)
        TaskManager.registerClientTask(
            TaskFactory.getDelayedTask("callback_mining_COPPER", player, objID,
                                       x, y), random.randrange(1, 4))
    elif name == "TIN":
        player.sendMessage("Your swing your pickaxe at the rock...")
        player.setAnimation(0x554)
        TaskManager.registerClientTask(
            TaskFactory.getDelayedTask("callback_mining_TIN", player, objID, x,
                                       y), random.randrange(1, 4))
    elif name == "IRON":
        if level >= 15:
            player.sendMessage("You swing your pickaxe at the rock...")
            player.setAnimation(0x554)
            TaskManager.registerClientTask(
                TaskFactory.getDelayedTask("callback_mining_IRON",
                                           player, objID, x, y),
                random.randrange(3, 6))
        else:
            player.sendMessage(
                "You need a mining level of 15 to mine this rock.")
    elif name == "SILVER":
        if level >= 20:
            player.sendMessage("You swing your pickaxe at the rock...")
            player.setAnimation(0x554)
            TaskManager.registerClientTask(
                TaskFactory.getDelayedTask("callback_mining_SILVER",
                                           player, objID, x, y),
                random.randrange(4, 6))
        else:
            player.sendMessage(
                "You need a mining level of 20 to mine this rock.")
    elif name == "COAL":
        if level >= 30:
            player.sendMessage("You swing your pickaxe at the rock...")
            player.setAnimation(0x554)
            TaskManager.registerClientTask(
                TaskFactory.getDelayedTask("callback_mining_COAL",
                                           player, objID, x, y),
                random.randrange(4, 9))
        else:
            player.sendMessage(
                "You need a mining level of 30 to mine this rock.")
    elif name == "GOLD":
        if level >= 40:
            player.sendMessage("You swing your pickaxe at the rock...")
            player.setAnimation(0x554)
            TaskManager.registerClientTask(
                TaskFactory.getDelayedTask("callback_mining_GOLD",
                                           player, objID, x, y),
                random.randrange(5, 9))
        else:
            player.sendMessage(
                "You need a mining level of 40 to mine this rock.")
    elif name == "MITHRIL":
        if level >= 55:
            player.sendMessage("You swing your pickaxe at the rock...")
            player.setAnimation(0x554)
            TaskManager.registerClientTask(
                TaskFactory.getDelayedTask("callback_mining_MITHRIL",
                                           player, objID, x, y),
                random.randrange(5, 13))
        else:
            player.sendMessage(
                "You need a mining level of 55 to mine this rock...")
    elif name == "ADAMANT":
        if level >= 70:
            player.sendMessage("You swing your pickaxe at the rock...")
            player.setAnimation(0x554)
            TaskManager.registerClientTask(
                TaskFactory.getDelayedTask("callback_mining_ADAMANT",
                                           player, objID, x, y),
                random.randrange(8, 18))
        else:
            player.sendMessage(
                "You need a mining level of 70 to mine this rock.")
    elif name == "RUNITE":
        if level >= 85:
            player.sendMessage("You swing your pickaxe at the rock...")
            player.setAnimation(0x554)
            TaskManager.registerClientTask(
                TaskFactory.getDelayedTask("callback_mining_RUNITE", player,
                                           objID, x, y),
                random.randrange(16, 32))
        else:
            player.sendMessage(
                "You need a mining level of 85 to mine this rock.")