PDA

View Full Version : Voodoo



kgolfer
08-14-2009, 09:30 PM
How does the Voodoo script work?

AK

Drunken Durfin
08-14-2009, 10:02 PM
Black magic.

kgolfer
08-14-2009, 10:31 PM
yeah, yeah, yeah......

pabstblueribbon
08-14-2009, 11:17 PM
FM









(fucking magic)





there are notes at the top of most scripts for a reason...

kgolfer
08-14-2009, 11:22 PM
Yeah, no shit. I got that far. I know it works like Psinet's Voodoo...but I would like to know how to make the variables and such. No worries. I will figure it out, thought someone would help out and not be a smart ass.

AK

Donquix
08-14-2009, 11:38 PM
what do you mean make the variables? do want custom interpretations of your own commands or you want to edit the existing commands?

;alias

kgolfer
08-14-2009, 11:43 PM
Ah, thank you. Still trying to figure Lich out, just converted today. Will check out Alias.

AK

pabstblueribbon
08-14-2009, 11:51 PM
Heh. Dude. All voodoo does is incant and cast at shit for you. For instance:

401 Dumbshit

.....would prep 401 and cast it on dumbshit.

I blame Noldo for making that fucking installer......

kgolfer
08-14-2009, 11:58 PM
Alright, starting to make sense now. I was looking for something to replace the baggage part of Psinet, where you could basically rename backpack to pack and type pack longsword and it would put your longsword in my backpack. Any such thing?

AK

SpiffyJr
08-15-2009, 12:36 AM
Heh. Dude. All voodoo does is incant and cast at shit for you. For instance:

401 Dumbshit

.....would prep 401 and cast it on dumbshit.

I blame Noldo for making that fucking installer......

My bad... jesus tits. Just a month ago 18 people were on and ;who just told me 56? WTFZ!

Joseph
08-15-2009, 02:15 AM
Alright, starting to make sense now. I was looking for something to replace the baggage part of Psinet, where you could basically rename backpack to pack and type pack longsword and it would put your longsword in my backpack. Any such thing?

AK

;alias set pack=;e put '_drag ' + GameObj.loot.find {|itm| itm.noun =~ /\?/}.id.to_s + ' ' + GameObj.inv.find {|inv| inv.noun =~ /backpack/}.id.to_s

SpiffyJr
08-15-2009, 11:47 AM
;alias set pack=;e put '_drag ' + GameObj.loot.find {|itm| itm.noun =~ /\?/}.id.to_s + ' ' + GameObj.inv.find {|inv| inv.noun =~ /backpack/}.id.to_s

This will work but I could write a script to do something similar.

Joseph
08-15-2009, 04:23 PM
This will work

I am surprised.. I didn't even test it in game.. just wrote it directly into the reply box /blush

kgolfer
08-15-2009, 05:32 PM
Tried what you wrote Joseph, and his is the error I received.

I tried "pack bar" (for a bronze bar).




Lich: exec1 active.
exec1:8191: warning: Object#id will be deprecated; use Object#object_id
[exec1]>_drag 4 58497474
--- Lich: exec1 has exited.
Not all drag and drop possibilities will result in valid command. Here are the possibilities that you can expect to work:

GET - dragging an object to the hands display
REMOVE - dragging a worn object to the hands display
SWAP - dragging a held object to the opposite hand display
DROP - dragging a held object to the ROOM window
WEAR - dragging a held object to the INVENTORY window
GIVE - dragging a held object to a link representing a player
PUT - dragging a held object to a CONTAINER window, or to a
link representing a container
STOW - dragging an object to the CONTAINER window or link
representing your default STOW container
CAST - dragging a spell link from the casting hand display
to a creature link
BEFRIEND- dragging a player link to the FRIENDS & ENEMIES panel

Deathravin
08-15-2009, 06:25 PM
sigh... wish people would stop trying to use _drag poorly. I get bad feelings about mis-using SF commands in scripts.

SpiffyJr
08-15-2009, 06:26 PM
Tried what you wrote Joseph, and his is the error I received.

I tried "pack bar" (for a bronze bar).




Lich: exec1 active.
exec1:8191: warning: Object#id will be deprecated; use Object#object_id
[exec1]>_drag 4 58497474
--- Lich: exec1 has exited.
Not all drag and drop possibilities will result in valid command. Here are the possibilities that you can expect to work:

GET - dragging an object to the hands display
REMOVE - dragging a worn object to the hands display
SWAP - dragging a held object to the opposite hand display
DROP - dragging a held object to the ROOM window
WEAR - dragging a held object to the INVENTORY window
GIVE - dragging a held object to a link representing a player
PUT - dragging a held object to a CONTAINER window, or to a
link representing a container
STOW - dragging an object to the CONTAINER window or link
representing your default STOW container
CAST - dragging a spell link from the casting hand display
to a creature link
BEFRIEND- dragging a player link to the FRIENDS & ENEMIES panel

Probably needs a # before the item id.

SpiffyJr
08-15-2009, 06:27 PM
sigh... wish people would stop trying to use _drag poorly. I get bad feelings about mis-using SF commands in scripts.

And how is the proper way?

Deathravin
08-15-2009, 06:29 PM
Probably needs a # before the item id.

You're not reading. It used a 4 as the item. It couldn't find the item it was looking for. There needs to be errorchecking

;alias set pack=;eq pack = GameObj.inv.find {|itm| itm.noun =~ /backpack/} ; item = GameObj.loot.find {|itm| itm.noun =~ /\?/} ; if item != nil and pack != nil then put "_drag ##{item.id} ##{pack.id}" end

SpiffyJr
08-15-2009, 06:35 PM
You're not reading. It used a 4 as the item. It couldn't find the item it was looking for. There needs to be errorchecking

;alias set pack=;eq pack = GameObj.loot.find {|itm| itm.noun =~ /backpack/} ; item = GameObj.loot.find {|itm| itm.noun =~ /\?/} ; if item != nil and pack != nil then put "_drag ##{item.id} ##{pack.id}" end


[exec1]>_drag 4 58497474

_drag requires the arguments to be preceded with a pound (#) sign. Maybe you weren't reading? If the item wasn't located the command would have been _drag 58497474 (notice the extra space). The item was clearly found.

FYI: Your command doesn't even execute.

EDIT: Did a bit more testing an it seems that the four was an item that wasn't found. Anyway, without the pound signs the function won't work properly.

SpiffyJr
08-15-2009, 06:39 PM
;alias set pack=;e put '_drag #' + GameObj.loot.find {|itm| itm.noun =~ /\?/}.id.to_s + ' #' + GameObj.inv.find {|inv| inv.noun =~ /bag/}.id.to_s

Works just doesn't have any sort of error checking. How about I whip up a script to do something similar? Creating an alias for this is a little more complicated than what aliases should be used for anyway.

Deathravin
08-15-2009, 06:39 PM
I know what _drag requires. Yes. it needs the #, but a 4 means lich can't find the item ID. It shouldn't have even run because it couldn't find it.

Deathravin
08-15-2009, 06:40 PM
;alias set pack=;e put '_drag #' + GameObj.loot.find {|itm| itm.noun =~ /\?/}.id.to_s + ' #' + GameObj.inv.find {|inv| inv.noun =~ /bag/}.id.to_s

Works just doesn't have any sort of error checking. How about I whip up a script to do something similar? Creating an alias for this is a little more complicated than what aliases should be used for anyway.

And if you try to pick up something that doesn't exist, its going to try to drag #4 still.

Deathravin
08-15-2009, 06:41 PM
;alias set pack=;eq pack = GameObj.inv.find {|itm| itm.noun =~ /backpack/} ; item = GameObj.loot.find {|itm| itm.noun =~ /\?/} ; if item != nil and pack != nil then put "_drag ##{item.id} ##{pack.id}" end

forgot to change the .loot to .inv

SpiffyJr
08-15-2009, 07:19 PM
;alias set pack=;eq pack = GameObj.inv.find {|itm| itm.noun =~ /backpack/} ; item = GameObj.loot.find {|itm| itm.noun =~ /\?/} ; if item != nil and pack != nil then put "_drag ##{item.id} ##{pack.id}" end

forgot to change the .loot to .inv

--- Lich SyntaxError: compile error
exec1:-1: syntax error, unexpected $end, expecting kEND
...ag ##{item.id} ##{pack.id} end

SpiffyJr
08-15-2009, 07:41 PM
;repo download sstow.lic

Baggage functionality. Only has "pack" right now but I'll add more if you want. Let me know what features it needs and I'll make sure it's a direct clone of Psinet's baggage.

Joseph
08-16-2009, 12:43 AM
There you go trying to write aliases with double quotes again.. bad spif! and yes I do have aliases that are .. erm well large but I write them as a script debug them and then convert them to oneliners.. This on the other hand was just an example for someone to play with.. food for thought so to say.. i was not trying to write an ultra alias that beats gemstone for you.. hence I didn't even test it.