• logo_cipsoft
    Nowe serwery zostały otwarte 19 Lut 2025:
    Noctalia (Open PvP) Ignitera (Open PvP) us_logo Xybra (Open PvP)

Zw?j z teleportem jak w Diablo v.2

Status
Zamknięty.

Gelio

Senior User
Dołączył
Kwiecień 10, 2008
Posty
617
Liczba reakcji
98
Wiek
29
Po tym tek?cie w poprzednim (nie moim) temacie:
wg mnie skrypt jest najbanalniejszym skryptem na swiecie co za problem napisac skrypt ktory po uzyciu przenosi w dane miejsce. nazwa wg mnie nie ma nic wspolnego z diablo... -1/10... zaraz pewnie beda komenty ze krytykuje a pewnie sam nic nie potrafi... specjalnie po tym temacie postanowilem napisac prawdziwy scroll like diablo II i udalo mi sie... scroll przenosi nas do naszego miasta (tego w ktorym mieszkamy) a po drugim uzyciu teleportuje nas na poprzednia pozycje... skryptu nie udostepnie bo zrobilem go na wlasny uzytek...
postanowi?em zrobi? co? takiego, jak autor tego posta.
Oto skrypt:
Kod:
function onUse(cid, item, frompos, item2, topos)
local temple = getPlayerMasterPos(cid)
local graczpos = getPlayerPosition(cid)
local storage = getPlayerStorageValue(cid,6198)
local storageposx = getPlayerStorageValue(cid,6199)
local storageposy = getPlayerStorageValue(cid,6200)
local storageposz = getPlayerStorageValue(cid,6201)
if ((storage == -1) or (storage == 2)) then
	setPlayerStorageValue(cid,storageposx,graczpos.x)
	setPlayerStorageValue(cid,storageposy,graczpos.y)
	setPlayerStorageValue(cid,storageposz,graczpos.z)
	doTeleportThing(cid,temple)
	setPlayerStorageValue(cid,storage,1)
	doSendMagicEffect(getPlayerPosition(cid),11)
else
	local postotp = {x=graczpos.x, y=graczpos.y, z=graczpos.z}
	doTeleportThing(cid,postotp)
	setPlayerStorageValue(cid,storage,2)
	doSendMagicEffect(getPlayerPosition(cid),11)
end
end
Jakie? b??dy? M?w.
Do actions.xml trzeba doda?:
Kod:
<action itemid="id zwoju jaki chcecie miec" script="nazwa pliku.lua
Pozdro,
Gelio
 
Odp: [8.x] Zw?j z teleportem jak w Diablo v.2

Odp: [8.x] Zw?j z teleportem jak w Diablo v.2

brawo odgadles moje rozumowanie ale masz pare bledow:
pierwszy:
Kod:
local storageposx = getPlayerStorageValue(cid,6199)
local storageposy = getPlayerStorageValue(cid,6200)
local storageposz = getPlayerStorageValue(cid,6201)
a tu znow te storage zmieniasz:
Kod:
	setPlayerStorageValue(cid,storageposx,graczpos.x)
	setPlayerStorageValue(cid,storageposy,graczpos.y)
	setPlayerStorageValue(cid,storageposz,graczpos.z)
tak nie bedzie dzialac getStorageValue pobiera wartosc danego storage tak jak ty okresliles to od 6198 do 6201 a potem w setPlayerStorageValue dajesz (cid,storageposx,graczpos.x) co jest bledem bo storageposx nie jest storageid tylko wartoscia tego storage.
Kod:
	local postotp = {x=graczpos.x, y=graczpos.y, z=graczpos.z}
w tym momencie przy else teleportuje cie do pozycji na ktorej jestes nie tej zapisanej :)
masz rowniez pare nie potrzebnych locali i okreslen no dobra udostepniam moj skrypt mimo ze nie byl jeszcze testowany
Kod:
::::::::::::::::::::::::::::::::::::::::::::::::::::
:::::::::::Teleport Scroll like Diablo II:::::::::::
::::::::::By NauR with Ernie's little help:::::::::: 
::::::::::::::::::::::::::::::::::::::::::::::::::::
function onUse(cid, item, frompos, item2, topos) 
local temple = getPlayerMasterPos(cid)
[COLOR="Red"]if getPlayerSkullType(cid) == 0 and getCreatureCondition(cid, CONDITION_INFIGHT) == 0 then [/COLOR]
if getPlayerStorageValue(cid, 10000) < 1 then
  doTeleportThing(cid,temple)
  doSendMagicEffect(temple, 41)
  setPlayerStorageValue(cid,10001,frompos.x)
  setPlayerStorageValue(cid,10002,frompos.y) 
  setPlayerStorageValue(cid,10003,frompos.z) 
  setPlayerStorageValue(cid,10000,1)
elseif getPlayerStorageValue(cid, 10000) == 1 then
local oldpos = {x = getPlayerStorageValue(cid, 10001),y = getPlayerStorageValue(cid, 10002),z = getPlayerStorageValue(cid, 10003)}
  doTeleportThing(cid,oldpos)
  doSendMagicEffect(oldpos, 41) 
  setPlayerStorageValue(cid,10000,0)
  [COLOR="Blue"]doRemoveItem(item.uid,1)[/COLOR]
end
[COLOR="red"]else
doPlayerSendCancel(uid,"You can't use this scroll if you've in fight or get skull")
end[/COLOR]
end

skrypt posiada blokade pvp gracz jesli jest/byl atakowany, atakuje/atakowa? lub ma skulla nie moze go uzyc aby to usunac wystarczy wykasowac to co na czerwono

scroll znika takze po drugim uzyciu (powrocie na dawna pozycje) aby to usunac pozbywamy sie tego na niebiesko

btw skrypt nie dziala na TFSie 8.3 i pewnie rowniez all pozostalych czemu? brak funkcji getPlayerMasterPos
 
Ostatnia edycja:
Odp: Zw?j z teleportem jak w Diablo v.2

Skrypt jest spox ale mogl bys jescze zrobic ze np portale otwieraj? sie obok graca i gracz moze do niego wejsc (ten gracz co go otwozyl) a portale by si? otwieraly na jakims polu w miescie jezeli jakis gracz chcia? by wejsc np do portalu otwozonego przez innego gracza to wtedy musz? oni byc na pt.:cool:
 
Odp: Zw?j z teleportem jak w Diablo v.2

to juz jest naprawde bardzo zaawansowane i podejzewam ze bez ingerencji w source sie nie obejdzie. moze na tfsie gdzie z tego co pamietam jest funkcja ktora tworzy teleport dalo by sie to zrobic.
 
Odp: Zw?j z teleportem jak w Diablo v.2

Brawo 8/10 a masz morze na 7.6
 
Odp: Zw?j z teleportem jak w Diablo v.2

niezle, widac ze jestes dobrym skrypterem,
gelio
 
Ostatnia edycja:
Odp: Zw?j z teleportem jak w Diablo v.2

Oba mi nie dzia?aja ;/ niech ktos to zrobi na 8.4 plz
 
Odp: Zw?j z teleportem jak w Diablo v.2

NauR mo?na to zrobi? bez zmiany source mo?e si? pobawi? jak znajd? czas ale na razie pozostawie was w napi?ciu i oczekiwaniu na nowy skrypt :P
Pzdr

PS
Jak co? pisa? na PW :P
 
Odp: Zw?j z teleportem jak w Diablo v.2

luux skrypt zobacze tylko czy dziala ale to by byl dobry pomysl miec przy sobie tp i np on by przenosil nas w temple danego miasta pzdr dobra robota
 
Odp: Zw?j z teleportem jak w Diablo v.2

fajny !
THX, naprawde mi pomogles ^6

Wstawilem go juz na swojego OTSa niedlugo wielki start . . . ;)
 
Odp: Zw?j z teleportem jak w Diablo v.2

Sorka ale dla mnie to jaki? totalny bzdet.
Za ka?dym razem kiedy kto? bd gin?? to u?yje zwoju.
0 zabawy.
 
Odp: Zw?j z teleportem jak w Diablo v.2

Skrypt ?adnie wykonany ale wydaje mi si? ?e to b?dzie taki skrypt na noobskie otsy w kt?rych kto? cie bije a ty teleporta walisz i nara.
 
Odp: Zw?j z teleportem jak w Diablo v.2

mi skrypt nie dziala mam blad ktory jest nastepujacy:
Kod:
Lua Script Error : [Action Interface]
data/actions/scripts/townportal.lua:onUse

data/actions/scripts/townportal.lua:3: attempt to call global 'getPlayerSkullType' <a nil value>
prosze Pomocy
 
Odp: Zw?j z teleportem jak w Diablo v.2

mi skrypt nie dziala mam blad ktory jest nastepujacy:
Kod:
Lua Script Error : [Action Interface]
data/actions/scripts/townportal.lua:onUse
data/actions/scripts/townportal.lua:3: attempt to call global 'getPlayerSkullType' <a nil value>
prosze Pomocy
 
Odp: Zw?j z teleportem jak w Diablo v.2

Jaki masz silnik? Chyba po prostu nie masz tej funkcji 'getPlayerSkullType(cid)' wi?c we? skrypt od Gelio.
 
Odp: Zw?j z teleportem jak w Diablo v.2

beznadzieja prawie wszystkie otsy sa pvp i ktos moze uciec przed pk beznadziejny pomysl nawt jak nie do dp to i tak mozna uciekac w ten sposub :down::down::down:
 
Odp: Zw?j z teleportem jak w Diablo v.2

jak zauwa?y?e? mo?na zrobi? ?eby gracz co ma fight nie m?g? si? teleportowa?:|
?wietny pomys? :) gratulacje dla autora za pomys? 9/10 :up::up:
 
Odp: Zw?j z teleportem jak w Diablo v.2

Po tym tek?cie w poprzednim (nie moim) temacie:
postanowi?em zrobi? co? takiego, jak autor tego posta.
Oto skrypt:
Kod:
function onUse(cid, item, frompos, item2, topos)
local temple = getPlayerMasterPos(cid)
local graczpos = getPlayerPosition(cid)
local storage = getPlayerStorageValue(cid,6198)
local storageposx = getPlayerStorageValue(cid,6199)
local storageposy = getPlayerStorageValue(cid,6200)
local storageposz = getPlayerStorageValue(cid,6201)
if ((storage == -1) or (storage == 2)) then
	setPlayerStorageValue(cid,storageposx,graczpos.x)
	setPlayerStorageValue(cid,storageposy,graczpos.y)
	setPlayerStorageValue(cid,storageposz,graczpos.z)
	doTeleportThing(cid,temple)
	setPlayerStorageValue(cid,storage,1)
	doSendMagicEffect(getPlayerPosition(cid),11)
else
	local postotp = {x=graczpos.x, y=graczpos.y, z=graczpos.z}
	doTeleportThing(cid,postotp)
	setPlayerStorageValue(cid,storage,2)
	doSendMagicEffect(getPlayerPosition(cid),11)
end
end
Mam pytanie Gdzie to da?, i czy b?dzie to dzia?a? na Evo 8.1?
 
Status
Zamknięty.
Do góry