Forum

> > CS2D > Scripts > TIBIA: Np'c lvl restarter and special item!
Forums overviewCS2D overview Scripts overviewLog in to reply

English TIBIA: Np'c lvl restarter and special item!

2 replies
To the start Previous 1 Next To the start

old TIBIA: Np'c lvl restarter and special item!

Glix
User Off Offline

Quote
Guys i know that all hate we´hen somebody makes thread about tibia. Please sorry, but now i really need help from you. Can some one tell how i can make np'c who restarts your level for money? can some one help?

I didn't wanted to do for this extra topic, but can you help me with this item who has special power?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
[529] = {
		name = "crystal dagger[P+]",
		desc = "Less dammage, but more speed. Upgraded with cricital hit [P+].",
		r = 209, g = 243, b = 241,  
		action = {"cricital hit [60]","equip"}, 
		slot = 3, 
		eimage = "gfx/weiwen/dagger.png", 
		fimage = "gfx/weiwen/dagger.png",  
		offsetx = 6,
		offsety = 17,
		atk = 2.2, 
		speed = -0.25, 
		level = 27, 
		func = equip,
		func = {function(id,itemslot,itemid,equip)
			radiusmsg(player(id,"name") .. " used special attack.", player(id,"x"), player(id,"y"))
			explosion(player(id, "x"), player(id,"y"), 64, 60, id)
			local pos = player(id,"x") .. " " .. player(id,"y")
			parse("effect \"colorsmoke\" " .. pos .. " 100 64 209 243 241;")
			parse("effect \"colorsmoke\" " .. pos .. " 75 64 255 0 0")
		end,equip},
	},

First of i want ask how i can do that
1
action = {"cricital hit [60]","equip"},
Equip slot is first and cricital hit slot is second.

Then i want ask that how i fix this thing. You need be level 27 to use this as u see
1
level = 27,
and its works fine, but for the cricital hit you don't need any lvl. Can some one help me to fix?
I know my english skills sucks. So dont make comments like "Learn english!". Please try understand me.]

[]Title also sucks
edited 1×, last 15.01.12 08:45:34 pm

old Re: TIBIA: Np'c lvl restarter and special item!

KenVo
User Off Offline

Quote
For the level reset NPC, add this after NPC 17 barnsower in npcs.lua:
1
[18] = {"Reset level", pos={464,560}, rot=0, image="npc3"},
Then add this after npc 17 function (between "end" and "for"):
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
NPCs[18].func = function(npc, id, words, state)
	if words == "hi" then
		NPCspeak(npc, "Greetings! Say 'reset' if you need to reset your level.")
		PLAYERS[id].tmp.npcstate = {npc, 1}
	elseif contains(words, "bye") then
		NPCspeak(npc, "Goodbye.")
		PLAYERS[id].tmp.npcstate = nil
	elseif state == 1 then
		if contains(words, "reset") then
			NPCspeak(npc, "Would you like to reset your level for $10?")
			PLAYERS[id].tmp.npcstate = {npc, 2}	
		end
	elseif state == 2 then
		if contains(words, "yes") then
			if addmoney(id, -10) then
				message(id, "You have lost $10.", "255255255")
				PLAYERS[id].Level = 1
				PLAYERS[id].Experience = 1
				updateHUD(id)
				NPCspeak(npc, "Enjoy!")
				PLAYERS[id].tmp.npcstate = nil
			else
				NPCspeak(npc, "Don't try to reset without paying!")
				PLAYERS[id].tmp.npcstate = nil
			end
		elseif contains(words, "no") then
			NPCspeak(npc, "Alright then.")
			PLAYERS[id].tmp.npcstate = nil
		end
	end
end
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview