![]() |
The LH Scripting Questions Thread
Alright, u guys are prolly sick of all my threads and questions so I will ask here and answer if you (and will)
My first question is... say you have a gani (single dir) that is 8 frames and its the exact same as the normal walk gani going left accept its single dir and it has slight modifications. How would you script it so it replaced it when they walk? |
replaceani walk,whateverganiofyours;
|
first off this wouldnt work cuz this is a single dir gani so setani wont work
|
Hmm, are you allowed to use multiframe single dir ganis on free? I thought you could only use the default ones and single frame and dir ganis
|
Non-P2P should be allowed to use stuff that modifys the walking npc, like adding a backpack or such, anything else that is not legal should be out the door. There is no use for gani on a non-p2p server.
|
except **** like the jumprope <3
|
free can use the jump rope but its ***, however, free servers can use multi frame single dir ganis. Anyways, i just modified the walking NPC and im trying to make this work. Anyone with any ideas?
|
fine, then do this:
NPC Code: |
non-p2p can use multi-framed single dir. prooved when some guy so keenly pointed out that you could make go karts for non-p2p...what a smart guy...:rolleyes:
|
Quote:
|
Anyone have any ideas? If not is there a way to display a chosen frame? like setani name,frame,;
|
forgot it was nonP2P, sorry
if you want it to specify a specific gani or something NPC Code: |
what about a menu? are menus using showimg hard to make?
|
Menu? yesh. the one i sent you was fairly simple. If you want to you can easily add and remove items from the menu, etc. I can chat with u on how to make it own.
|
//NPC Made By LORD HELMUT
if(created){ this.max=7; } if(playerchats) { tokenize #c; if(strequals(#a,#I(server.ph1tenants,0))){ //add new Tenant if(startswith(AddTenant,#c)){ if(sarraylen(server.ph1tenants) <= this.max){ addstring server.ph1tenants,#t(1); } else { setplayerprop #c,You already have #v(sarraylen(server.ph1tenants)-1) tenants!; //-1 cause of the owner } } //remove tenant if(startswith(RemoveTenant,#c)){ removestring server.ph1tenants,#t(1); } } } thats a ghetto old script I made but remove tenant wont work =/ I say removetenant lordhelmut and it no workie |
a menu is simple :p
thats what im working on right now, but it is like 4 or 5 combined into one :S |
how exactly do u make them?
|
Quote:
|
well lets see, make the menu image
then use showimg index,imagename,x,y; changeimgvis index,4; then it all depends on what you want |
// NPC made by Golem
if (playertouchsme) { this.pos=0; disabledefmovement; setani idle,; timeout=.05; } if(timeout&&this.pos=0){ showimg 200,@Arial@cb@->Deposit,(screenwidth/2),(screenheight/2-120); showimg 201,@Arial@cb@Withdrawl,(screenwidth/2),(screenheight/2-100); changeimgvis 200,4; changeimgvis 201,4; if(keydown(2)&&this.pos=0){ this.pos=1; showimg 200,@Arial@cb@Deposit,(screenwidth/2),(screenheight/2-120); showimg 201,@Arial@cb@->Withdrawl,(screenwidth/2),(screenheight/2-100); changeimgvis 200,4; changeimgvis 201,4; } if(keydown(2)&&this.pos=1){ timeout=.05; } timeout=.05; } HOW IS THAT SO FAR :D |
ahhhhh, im sorry i just dont like showimg text menus
|
-=Josey=-
This may not be the best for advanced scripts, but since you were asking how, you most likely won't be making any advanced ones yet. /* NPC made by Josey Hunt. This is a simple menu selector. */ if (playertouchsme){ doImages(); disabledefmovement; } function doImages(){ showimg 1,@~ Test,50,200; showimg 2,@Exit,50,250; this.selected=0; doZoom(); this.enabled=1; timeout=.05; } if (timeout&&this.enabled=1){ doKeyCheck(); timeout=.05; } function doKeyCheck(){ if (keydown(2)&&this.selected=0){ this.selected=1; showimg 1,@Test,50,200; showimg 2,@~ Exit,50,250; } if (keydown(0)&&this.selected=1){ this.selected=0; showimg 1,@~ Test,50,200; showimg 2,@Exit,50,250; } if (keydown(5)){ if (this.selected=0){ say2 Testing!; } if (this.selected=1){ Exit(); } } doZoom(); timeout=.05; } function doZoom(){ changeimgvis 1,4; changeimgzoom 1,.6; changeimgcolors 1,0,0,0,255; changeimgvis 2,4; changeimgzoom 2,.6; changeimgcolors 2,0,0,0,255; } function Exit(){ showimg 1,,,; showimg 2,,,; enabledefmovement; timeout=0; this.enabled=0; } |
Yea that helped a lot =D thanks
|
-=Josey=-
You're welcome. ;D |
-=Josey=-
Well I think that I've beaten insomnia right about now. So it's time for me to take my weekly slumber. Later everyone. |
Couple Questions...
One, for a NPC like a system or something, how do you have it ALWAYS checking for like a keydown or an action or something? Second, Whats the best way to script a chase script for a boss or baddie that should go after the nearest player. (I know player index but I dont understand how to use it) |
Shiw Image
Well i am working ona few sho image menu's for asteria at the moment, so if you still havn't got it sorted out drop me a line :D
|
| All times are GMT +2. The time now is 11:42 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.